···65 return 0;66}6700000000000000000000068/***************************************************************** Detection */69static int jazz_esp_detect(struct scsi_host_template *tpnt)70{
+15-14
drivers/scsi/megaraid/megaraid_sas.c
···793 return 0;794}79500000000000000796/**797 * megasas_wait_for_outstanding - Wait for all outstanding cmds798 * @instance: Adapter soft state···957 .module = THIS_MODULE,958 .name = "LSI Logic SAS based MegaRAID driver",959 .proc_name = "megaraid_sas",0960 .queuecommand = megasas_queue_command,961 .eh_device_reset_handler = megasas_reset_device,962 .eh_bus_reset_handler = megasas_reset_bus_host,···1084 cmd->sync_cmd = 0;1085 megasas_complete_int_cmd(instance, cmd);1086 break;1087- }1088-1089- /*1090- * Don't export physical disk devices to mid-layer.1091- */1092- if (!MEGASAS_IS_LOGICAL(cmd->scmd) &&1093- (hdr->cmd_status == MFI_STAT_OK) &&1094- (cmd->scmd->cmnd[0] == INQUIRY)) {1095-1096- if (((*(u8 *) cmd->scmd->request_buffer) & 0x1F) ==1097- TYPE_DISK) {1098- cmd->scmd->result = DID_BAD_TARGET << 16;1099- exception = 1;1100- }1101 }11021103 case MFI_CMD_LD_READ:
···793 return 0;794}795796+static int megasas_slave_configure(struct scsi_device *sdev)797+{798+ /*799+ * Don't export physical disk devices to the disk driver.800+ *801+ * FIXME: Currently we don't export them to the midlayer at all.802+ * That will be fixed once LSI engineers have audited the803+ * firmware for possible issues.804+ */805+ if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)806+ return -ENXIO;807+ return 0;808+}809+810/**811 * megasas_wait_for_outstanding - Wait for all outstanding cmds812 * @instance: Adapter soft state···943 .module = THIS_MODULE,944 .name = "LSI Logic SAS based MegaRAID driver",945 .proc_name = "megaraid_sas",946+ .slave_configure = megasas_slave_configure,947 .queuecommand = megasas_queue_command,948 .eh_device_reset_handler = megasas_reset_device,949 .eh_bus_reset_handler = megasas_reset_bus_host,···1069 cmd->sync_cmd = 0;1070 megasas_complete_int_cmd(instance, cmd);1071 break;000000000000001072 }10731074 case MFI_CMD_LD_READ:
···1308 * the request was not marked fast fail. Note that above,1309 * even if the request is marked fast fail, we still requeue1310 * for queue congestion conditions (QUEUE_FULL or BUSY) */1311- if ((++scmd->retries) < scmd->allowed 1312 && !blk_noretry_request(scmd->request)) {1313 return NEEDS_RETRY;1314 } else {···1433 list_del_init(&scmd->eh_entry);1434 if (scsi_device_online(scmd->device) &&1435 !blk_noretry_request(scmd->request) &&1436- (++scmd->retries < scmd->allowed)) {1437 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"1438 " retry cmd: %p\n",1439 current->comm,
···1308 * the request was not marked fast fail. Note that above,1309 * even if the request is marked fast fail, we still requeue1310 * for queue congestion conditions (QUEUE_FULL or BUSY) */1311+ if ((++scmd->retries) <= scmd->allowed1312 && !blk_noretry_request(scmd->request)) {1313 return NEEDS_RETRY;1314 } else {···1433 list_del_init(&scmd->eh_entry);1434 if (scsi_device_online(scmd->device) &&1435 !blk_noretry_request(scmd->request) &&1436+ (++scmd->retries <= scmd->allowed)) {1437 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"1438 " retry cmd: %p\n",1439 current->comm,
+1-1
drivers/scsi/scsi_lib.c
···1498static void scsi_softirq_done(struct request *rq)1499{1500 struct scsi_cmnd *cmd = rq->completion_data;1501- unsigned long wait_for = cmd->allowed * cmd->timeout_per_command;1502 int disposition;15031504 INIT_LIST_HEAD(&cmd->eh_entry);
···752753 transport_configure_device(&sdev->sdev_gendev);754755- if (sdev->host->hostt->slave_configure)756- sdev->host->hostt->slave_configure(sdev);000000000000757758 /*759 * Ok, the device is now all set up, we can
···752753 transport_configure_device(&sdev->sdev_gendev);754755+ if (sdev->host->hostt->slave_configure) {756+ int ret = sdev->host->hostt->slave_configure(sdev);757+ if (ret) {758+ /*759+ * if LLDD reports slave not present, don't clutter760+ * console with alloc failure messages761+ */762+ if (ret != -ENXIO) {763+ sdev_printk(KERN_ERR, sdev,764+ "failed to configure device\n");765+ }766+ return SCSI_SCAN_NO_RESPONSE;767+ }768+ }769770 /*771 * Ok, the device is now all set up, we can
+1-2
drivers/scsi/scsi_transport_fc.c
···1498 }14991500 /* Search the bindings array */1501- if (likely((ids->roles & FC_RPORT_ROLE_FCP_TARGET) &&1502- (fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE))) {15031504 /* search for a matching consistent binding */1505
···1498 }14991500 /* Search the bindings array */1501+ if (fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE) {015021503 /* search for a matching consistent binding */1504
+1-1
drivers/scsi/sg.c
···21622163 srp->res_used = 1;2164 SCSI_LOG_TIMEOUT(4, printk("sg_link_reserve: size=%d\n", size));2165- rem = size = (size + 1) & (~1); /* round to even for aha1542 */21662167 for (k = 0; k < rsv_schp->k_use_sg; ++k, ++sg) {2168 num = sg->length;
···21622163 srp->res_used = 1;2164 SCSI_LOG_TIMEOUT(4, printk("sg_link_reserve: size=%d\n", size));2165+ rem = size;21662167 for (k = 0; k < rsv_schp->k_use_sg; ++k, ++sg) {2168 num = sg->length;