History

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley: "This is three bug fixes: An fnic warning caused by sleeping under a lock, a major regression with our updated WRITE SAME/UNMAP logic which caused tons of USB devices (and one RAID card) to cease to function and a megaraid_sas firmware initialisation problem which causes kdump failures" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: [SCSI] Don't attempt to send extended INQUIRY command if skip_vpd_pages is set [SCSI] fnic: BUG: sleeping function called from invalid context during probe [SCSI] megaraid_sas: megaraid_sas driver init fails in kdump kernel

Linus Torvalds committed 13 years ago

Commit e5d081f2 parents 77f63b4 75625234 files · +28 −19Browse files

Unified · Split

4 files
  1. drivers/scsi/fnic/fnic.h +1 −1
  2. drivers/scsi/fnic/fnic_main.c +9 −13
  3. drivers/scsi/megaraid/megaraid_sas_base.c +15 −5
  4. drivers/scsi/scsi.c +3 −0
drivers/scsi/fnic/fnic.h+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838
3939 #define DRV_NAME "fnic"
4040 #define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
41−#define DRV_VERSION "1.5.0.22"
41+#define DRV_VERSION "1.5.0.23"
4242 #define PFX DRV_NAME ": "
4343 #define DFX DRV_NAME "%d: "
4444
drivers/scsi/fnic/fnic_main.c+9−13
@@ -642,19 +642,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 641 unmodified lines
642642 INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame);
643643 INIT_WORK(&fnic->event_work, fnic_handle_event);
644644 skb_queue_head_init(&fnic->fip_frame_queue);
645− spin_lock_irqsave(&fnic_list_lock, flags);
646− if (!fnic_fip_queue) {
647− fnic_fip_queue =
648− create_singlethread_workqueue("fnic_fip_q");
649− if (!fnic_fip_queue) {
650− spin_unlock_irqrestore(&fnic_list_lock, flags);
651− printk(KERN_ERR PFX "fnic FIP work queue "
652− "create failed\n");
653− err = -ENOMEM;
654− goto err_out_free_max_pool;
655− }
656− }
657− spin_unlock_irqrestore(&fnic_list_lock, flags);
658645 INIT_LIST_HEAD(&fnic->evlist);
659646 INIT_LIST_HEAD(&fnic->vlans);
660647 } else {
@@ -960,6 +947,13 @@ static int __init fnic_init_module(void) · 299 unmodified lines
960947 spin_lock_init(&fnic_list_lock);
961948 INIT_LIST_HEAD(&fnic_list);
962949
950+ fnic_fip_queue = create_singlethread_workqueue("fnic_fip_q");
951+ if (!fnic_fip_queue) {
952+ printk(KERN_ERR PFX "fnic FIP work queue create failed\n");
953+ err = -ENOMEM;
954+ goto err_create_fip_workq;
955+ }
956+
963957 fnic_fc_transport = fc_attach_transport(&fnic_fc_functions);
964958 if (!fnic_fc_transport) {
965959 printk(KERN_ERR PFX "fc_attach_transport error\n");
@@ -978,6 +972,8 @@ static int __init fnic_init_module(void) · 12 unmodified lines
978972 err_pci_register:
979973 fc_release_transport(fnic_fc_transport);
980974 err_fc_transport:
975+ destroy_workqueue(fnic_fip_queue);
976+err_create_fip_workq:
981977 destroy_workqueue(fnic_event_queue);
982978 err_create_fnic_workq:
983979 kmem_cache_destroy(fnic_io_req_cache);
drivers/scsi/megaraid/megaraid_sas_base.c+15−5
@@ -3547,11 +3547,21 @@ static int megasas_init_fw(struct megasas_instance *instance) · 3546 unmodified lines
35473547 break;
35483548 }
35493549
3550− /*
3551− * We expect the FW state to be READY
3552− */
3553− if (megasas_transition_to_ready(instance, 0))
3554− goto fail_ready_state;
3550+ if (megasas_transition_to_ready(instance, 0)) {
3551+ atomic_set(&instance->fw_reset_no_pci_access, 1);
3552+ instance->instancet->adp_reset
3553+ (instance, instance->reg_set);
3554+ atomic_set(&instance->fw_reset_no_pci_access, 0);
3555+ dev_info(&instance->pdev->dev,
3556+ "megasas: FW restarted successfully from %s!\n",
3557+ __func__);
3558+
3559+ /*waitting for about 30 second before retry*/
3560+ ssleep(30);
3561+
3562+ if (megasas_transition_to_ready(instance, 0))
3563+ goto fail_ready_state;
3564+ }
35553565
35563566 /*
35573567 * MSI-X host index 0 is common for all adapter.
drivers/scsi/scsi.c+3−0
@@ -1031,6 +1031,9 @@ int scsi_get_vpd_page(struct scsi_device *sdev, u8 page, unsigned char *buf, · 1030 unmodified lines
10311031 {
10321032 int i, result;
10331033
1034+ if (sdev->skip_vpd_pages)
1035+ goto fail;
1036+
10341037 /* Ask for all the pages supported by this device */
10351038 result = scsi_vpd_inquiry(sdev, buf, 0, buf_len);
10361039 if (result)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t