Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull SCSI fixes from James Bottomley:
"This is seven basic fixes (plus one MAINTAINER update) which came in
close to the merge window"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
ipr: Fix error return code in ipr_probe_ioa()
fcoe: add missing destroy_workqueue() on error in fcoe_init()
lpfc: Fix possible NULL pointer dereference
fcoe: Use default VLAN for FIP VLAN discovery
ipr: Wait to do async scan until scsi host is initialized
MAINTAINERS: Update cxlflash maintainers
cxlflash: Verify problem state area is mapped before notifying shutdown
lpfc: fix oops in lpfc_sli4_scmd_to_wqidx_distr() from lpfc_send_taskmgmt()

+79 -13
+1
MAINTAINERS
··· 3494 3494 CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER 3495 3495 M: Manoj N. Kumar <manoj@linux.vnet.ibm.com> 3496 3496 M: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> 3497 + M: Uma Krishnan <ukrishn@linux.vnet.ibm.com> 3497 3498 L: linux-scsi@vger.kernel.org 3498 3499 S: Supported 3499 3500 F: drivers/scsi/cxlflash/
+9 -1
drivers/scsi/cxlflash/main.c
··· 778 778 { 779 779 struct afu *afu = cfg->afu; 780 780 struct device *dev = &cfg->dev->dev; 781 - struct sisl_global_map __iomem *global = &afu->afu_map->global; 781 + struct sisl_global_map __iomem *global; 782 782 struct dev_dependent_vals *ddv; 783 783 u64 reg, status; 784 784 int i, retry_cnt = 0; ··· 786 786 ddv = (struct dev_dependent_vals *)cfg->dev_id->driver_data; 787 787 if (!(ddv->flags & CXLFLASH_NOTIFY_SHUTDOWN)) 788 788 return; 789 + 790 + if (!afu || !afu->afu_map) { 791 + dev_dbg(dev, "%s: The problem state area is not mapped\n", 792 + __func__); 793 + return; 794 + } 795 + 796 + global = &afu->afu_map->global; 789 797 790 798 /* Notify AFU */ 791 799 for (i = 0; i < NUM_FC_PORTS; i++) {
+50 -2
drivers/scsi/fcoe/fcoe.c
··· 92 92 93 93 static int fcoe_fip_recv(struct sk_buff *, struct net_device *, 94 94 struct packet_type *, struct net_device *); 95 + static int fcoe_fip_vlan_recv(struct sk_buff *, struct net_device *, 96 + struct packet_type *, struct net_device *); 95 97 96 98 static void fcoe_fip_send(struct fcoe_ctlr *, struct sk_buff *); 97 99 static void fcoe_update_src_mac(struct fc_lport *, u8 *); ··· 365 363 fcoe->fip_packet_type.dev = netdev; 366 364 dev_add_pack(&fcoe->fip_packet_type); 367 365 366 + if (netdev != real_dev) { 367 + fcoe->fip_vlan_packet_type.func = fcoe_fip_vlan_recv; 368 + fcoe->fip_vlan_packet_type.type = htons(ETH_P_FIP); 369 + fcoe->fip_vlan_packet_type.dev = real_dev; 370 + dev_add_pack(&fcoe->fip_vlan_packet_type); 371 + } 368 372 return 0; 369 373 } 370 374 ··· 458 450 */ 459 451 __dev_remove_pack(&fcoe->fcoe_packet_type); 460 452 __dev_remove_pack(&fcoe->fip_packet_type); 453 + if (netdev != fcoe->realdev) 454 + __dev_remove_pack(&fcoe->fip_vlan_packet_type); 461 455 synchronize_net(); 462 456 463 457 /* Delete secondary MAC addresses */ ··· 530 520 } 531 521 532 522 /** 523 + * fcoe_fip_vlan_recv() - Handler for received FIP VLAN discovery frames 524 + * @skb: The receive skb 525 + * @netdev: The associated net device 526 + * @ptype: The packet_type structure which was used to register this handler 527 + * @orig_dev: The original net_device the the skb was received on. 528 + * (in case dev is a bond) 529 + * 530 + * Returns: 0 for success 531 + */ 532 + static int fcoe_fip_vlan_recv(struct sk_buff *skb, struct net_device *netdev, 533 + struct packet_type *ptype, 534 + struct net_device *orig_dev) 535 + { 536 + struct fcoe_interface *fcoe; 537 + struct fcoe_ctlr *ctlr; 538 + 539 + fcoe = container_of(ptype, struct fcoe_interface, fip_vlan_packet_type); 540 + ctlr = fcoe_to_ctlr(fcoe); 541 + fcoe_ctlr_recv(ctlr, skb); 542 + return 0; 543 + } 544 + 545 + /** 533 546 * fcoe_port_send() - Send an Ethernet-encapsulated FIP/FCoE frame 534 547 * @port: The FCoE port 535 548 * @skb: The FIP/FCoE packet to be sent ··· 572 539 */ 573 540 static void fcoe_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb) 574 541 { 575 - skb->dev = fcoe_from_ctlr(fip)->netdev; 542 + struct fcoe_interface *fcoe = fcoe_from_ctlr(fip); 543 + struct fip_frame { 544 + struct ethhdr eth; 545 + struct fip_header fip; 546 + } __packed *frame; 547 + 548 + /* 549 + * Use default VLAN for FIP VLAN discovery protocol 550 + */ 551 + frame = (struct fip_frame *)skb->data; 552 + if (frame->fip.fip_op == ntohs(FIP_OP_VLAN) && 553 + fcoe->realdev != fcoe->netdev) 554 + skb->dev = fcoe->realdev; 555 + else 556 + skb->dev = fcoe->netdev; 576 557 fcoe_port_send(lport_priv(fip->lp), skb); 577 558 } 578 559 ··· 2495 2448 if (rc) { 2496 2449 printk(KERN_ERR "failed to register an fcoe transport, check " 2497 2450 "if libfcoe is loaded\n"); 2498 - return rc; 2451 + goto out_destroy; 2499 2452 } 2500 2453 2501 2454 mutex_lock(&fcoe_config_mutex); ··· 2518 2471 2519 2472 out_free: 2520 2473 mutex_unlock(&fcoe_config_mutex); 2474 + out_destroy: 2521 2475 destroy_workqueue(fcoe_wq); 2522 2476 return rc; 2523 2477 }
+1
drivers/scsi/fcoe/fcoe.h
··· 80 80 struct net_device *realdev; 81 81 struct packet_type fcoe_packet_type; 82 82 struct packet_type fip_packet_type; 83 + struct packet_type fip_vlan_packet_type; 83 84 struct fc_exch_mgr *oem; 84 85 u8 removed; 85 86 u8 priority;
+10
drivers/scsi/ipr.c
··· 3288 3288 return; 3289 3289 } 3290 3290 3291 + if (!ioa_cfg->scan_enabled) { 3292 + spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 3293 + return; 3294 + } 3295 + 3291 3296 restart: 3292 3297 do { 3293 3298 did_work = 0; ··· 10219 10214 10220 10215 if (!ioa_cfg->reset_work_q) { 10221 10216 dev_err(&pdev->dev, "Couldn't register reset workqueue\n"); 10217 + rc = -ENOMEM; 10222 10218 goto out_free_irq; 10223 10219 } 10224 10220 } else ··· 10368 10362 static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) 10369 10363 { 10370 10364 struct ipr_ioa_cfg *ioa_cfg; 10365 + unsigned long flags; 10371 10366 int rc, i; 10372 10367 10373 10368 rc = ipr_probe_ioa(pdev, dev_id); ··· 10421 10414 } 10422 10415 } 10423 10416 10417 + spin_lock_irqsave(ioa_cfg->host->host_lock, flags); 10418 + ioa_cfg->scan_enabled = 1; 10424 10419 schedule_work(&ioa_cfg->work_q); 10420 + spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); 10425 10421 return 0; 10426 10422 } 10427 10423
+1
drivers/scsi/ipr.h
··· 1478 1478 u8 in_ioa_bringdown:1; 1479 1479 u8 ioa_unit_checked:1; 1480 1480 u8 dump_taken:1; 1481 + u8 scan_enabled:1; 1481 1482 u8 scan_done:1; 1482 1483 u8 needs_hard_reset:1; 1483 1484 u8 dual_raid:1;
+1 -1
drivers/scsi/lpfc/lpfc_scsi.c
··· 3877 3877 uint32_t tag; 3878 3878 uint16_t hwq; 3879 3879 3880 - if (shost_use_blk_mq(cmnd->device->host)) { 3880 + if (cmnd && shost_use_blk_mq(cmnd->device->host)) { 3881 3881 tag = blk_mq_unique_tag(cmnd->request); 3882 3882 hwq = blk_mq_unique_tag_to_hwq(tag); 3883 3883
+6 -9
drivers/scsi/lpfc/lpfc_sli.c
··· 1323 1323 { 1324 1324 lockdep_assert_held(&phba->hbalock); 1325 1325 1326 + BUG_ON(!piocb || !piocb->vport); 1327 + 1326 1328 list_add_tail(&piocb->list, &pring->txcmplq); 1327 1329 piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ; 1328 1330 1329 1331 if ((unlikely(pring->ringno == LPFC_ELS_RING)) && 1330 1332 (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && 1331 1333 (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) && 1332 - (!(piocb->vport->load_flag & FC_UNLOADING))) { 1333 - if (!piocb->vport) 1334 - BUG(); 1335 - else 1336 - mod_timer(&piocb->vport->els_tmofunc, 1337 - jiffies + 1338 - msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); 1339 - } 1340 - 1334 + (!(piocb->vport->load_flag & FC_UNLOADING))) 1335 + mod_timer(&piocb->vport->els_tmofunc, 1336 + jiffies + 1337 + msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); 1341 1338 1342 1339 return 0; 1343 1340 }