| .. | .. |
|---|
| 236 | 236 | sdev->sdev_state = SDEV_CREATED; |
|---|
| 237 | 237 | INIT_LIST_HEAD(&sdev->siblings); |
|---|
| 238 | 238 | INIT_LIST_HEAD(&sdev->same_target_siblings); |
|---|
| 239 | | - INIT_LIST_HEAD(&sdev->cmd_list); |
|---|
| 240 | 239 | INIT_LIST_HEAD(&sdev->starved_entry); |
|---|
| 241 | 240 | INIT_LIST_HEAD(&sdev->event_list); |
|---|
| 242 | 241 | spin_lock_init(&sdev->list_lock); |
|---|
| .. | .. |
|---|
| 266 | 265 | */ |
|---|
| 267 | 266 | sdev->borken = 1; |
|---|
| 268 | 267 | |
|---|
| 269 | | - if (shost_use_blk_mq(shost)) |
|---|
| 270 | | - sdev->request_queue = scsi_mq_alloc_queue(sdev); |
|---|
| 271 | | - else |
|---|
| 272 | | - sdev->request_queue = scsi_old_alloc_queue(sdev); |
|---|
| 268 | + sdev->request_queue = scsi_mq_alloc_queue(sdev); |
|---|
| 273 | 269 | if (!sdev->request_queue) { |
|---|
| 274 | 270 | /* release fn is set up in scsi_sysfs_device_initialise, so |
|---|
| 275 | 271 | * have to free and put manually here */ |
|---|
| .. | .. |
|---|
| 280 | 276 | WARN_ON_ONCE(!blk_get_queue(sdev->request_queue)); |
|---|
| 281 | 277 | sdev->request_queue->queuedata = sdev; |
|---|
| 282 | 278 | |
|---|
| 283 | | - if (!shost_use_blk_mq(sdev->host)) { |
|---|
| 284 | | - blk_queue_init_tags(sdev->request_queue, |
|---|
| 285 | | - sdev->host->cmd_per_lun, shost->bqt, |
|---|
| 286 | | - shost->hostt->tag_alloc_policy); |
|---|
| 287 | | - } |
|---|
| 288 | 279 | scsi_change_queue_depth(sdev, sdev->host->cmd_per_lun ? |
|---|
| 289 | 280 | sdev->host->cmd_per_lun : 1); |
|---|
| 290 | 281 | |
|---|
| .. | .. |
|---|
| 1138 | 1129 | * that no LUN is present, so don't add sdev in these cases. |
|---|
| 1139 | 1130 | * Two specific examples are: |
|---|
| 1140 | 1131 | * 1) NetApp targets: return PQ=1, PDT=0x1f |
|---|
| 1141 | | - * 2) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" |
|---|
| 1132 | + * 2) IBM/2145 targets: return PQ=1, PDT=0 |
|---|
| 1133 | + * 3) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" |
|---|
| 1142 | 1134 | * in the UFI 1.0 spec (we cannot rely on reserved bits). |
|---|
| 1143 | 1135 | * |
|---|
| 1144 | 1136 | * References: |
|---|
| .. | .. |
|---|
| 1152 | 1144 | * PDT=00h Direct-access device (floppy) |
|---|
| 1153 | 1145 | * PDT=1Fh none (no FDD connected to the requested logical unit) |
|---|
| 1154 | 1146 | */ |
|---|
| 1155 | | - if (((result[0] >> 5) == 1 || starget->pdt_1f_for_no_lun) && |
|---|
| 1156 | | - (result[0] & 0x1f) == 0x1f && |
|---|
| 1147 | + if (((result[0] >> 5) == 1 || |
|---|
| 1148 | + (starget->pdt_1f_for_no_lun && (result[0] & 0x1f) == 0x1f)) && |
|---|
| 1157 | 1149 | !scsi_is_wlun(lun)) { |
|---|
| 1158 | 1150 | SCSI_LOG_SCAN_BUS(3, sdev_printk(KERN_INFO, sdev, |
|---|
| 1159 | 1151 | "scsi scan: peripheral device type" |
|---|