]> git.hungrycats.org Git - linux/commitdiff
IEEE1394/SBP2(r1148): Fix a few bugs, and add set blk_queue_dma_alignment to 512.
authorBen Collins <bcollins@debian.org>
Sat, 21 Feb 2004 14:26:37 +0000 (09:26 -0500)
committerBen Collins <bcollins@debian.org>
Sat, 21 Feb 2004 14:26:37 +0000 (09:26 -0500)
drivers/ieee1394/sbp2.c

index f9c0170b6d66078b38f5e942dbef30deafe9cde2..aaa5c23304b0e662feb807719e14625b47476a0a 100644 (file)
@@ -660,7 +660,7 @@ static int sbp2_update(struct unit_directory *ud)
                if (sbp2_login_device(scsi_id)) {
                        /* Login failed too, just fail, and the backend
                         * will call our sbp2_remove for us */
-                       SBP2_ERR("sbp2_reconnect_device failed!");
+                       SBP2_INFO("sbp2_reconnect_device failed!");
                        return -EBUSY;
                }
        }
@@ -731,7 +731,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
 #ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
                /* Handle data movement if physical dma is not
                 * enabled/supportedon host controller */
-               hpsb_register_addrspace(&sbp2_highlevel, host, &sbp2_physdma_ops,
+               hpsb_register_addrspace(&sbp2_highlevel, ud->ne->host, &sbp2_physdma_ops,
                                        0x0ULL, 0xfffffffcULL);
 #endif
        }
@@ -1149,12 +1149,12 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
        SBP2_DEBUG("sbp2_query_logins: written");
 
        if (sbp2util_down_timeout(&scsi_id->sbp2_login_complete, 2*HZ)) {
-               SBP2_ERR("Error querying logins to SBP-2 device - timed out");
+               SBP2_INFO("Error querying logins to SBP-2 device - timed out");
                return(-EIO);
        }
 
        if (scsi_id->status_block.ORB_offset_lo != scsi_id->query_logins_orb_dma) {
-               SBP2_ERR("Error querying logins to SBP-2 device - timed out");
+               SBP2_INFO("Error querying logins to SBP-2 device - timed out");
                return(-EIO);
        }
 
@@ -1162,7 +1162,7 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
            STATUS_GET_DEAD_BIT(scsi_id->status_block.ORB_offset_hi_misc) ||
            STATUS_GET_SBP_STATUS(scsi_id->status_block.ORB_offset_hi_misc)) {
 
-               SBP2_ERR("Error querying logins to SBP-2 device - timed out");
+               SBP2_INFO("Error querying logins to SBP-2 device - timed out");
                return(-EIO);
        }
 
@@ -1171,13 +1171,13 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
        SBP2_DEBUG("length_max_logins = %x",
                   (unsigned int)scsi_id->query_logins_response->length_max_logins);
 
-       SBP2_INFO("Query logins to SBP-2 device successful");
+       SBP2_DEBUG("Query logins to SBP-2 device successful");
 
        max_logins = RESPONSE_GET_MAX_LOGINS(scsi_id->query_logins_response->length_max_logins);
-       SBP2_INFO("Maximum concurrent logins supported: %d", max_logins);
+       SBP2_DEBUG("Maximum concurrent logins supported: %d", max_logins);
                                                                                 
        active_logins = RESPONSE_GET_ACTIVE_LOGINS(scsi_id->query_logins_response->length_max_logins);
-       SBP2_INFO("Number of active logins: %d", active_logins);
+       SBP2_DEBUG("Number of active logins: %d", active_logins);
                                                                                 
        if (active_logins >= max_logins) {
                return(-EIO);
@@ -1204,7 +1204,7 @@ static int sbp2_login_device(struct scsi_id_instance_data *scsi_id)
 
        if (!exclusive_login) {
                if (sbp2_query_logins(scsi_id)) {
-                       SBP2_ERR("Device does not support any more concurrent logins");
+                       SBP2_INFO("Device does not support any more concurrent logins");
                        return(-EIO);
                }
        }
@@ -2687,6 +2687,15 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
        return;
 }
 
+
+static int sbp2scsi_slave_configure (struct scsi_device *sdev)
+{
+       blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
+
+       return 0;
+}
+
+
 /*
  * Called by scsi stack when something has really gone wrong.  Usually
  * called when a command has timed-out for some reason.
@@ -2802,6 +2811,7 @@ static Scsi_Host_Template scsi_driver_template = {
        .eh_device_reset_handler =      sbp2scsi_reset,
        .eh_bus_reset_handler =         sbp2scsi_reset,
        .eh_host_reset_handler =        sbp2scsi_reset,
+       .slave_configure =              sbp2scsi_slave_configure,
        .this_id =                      -1,
        .sg_tablesize =                 SG_ALL,
        .use_clustering =               ENABLE_CLUSTERING,