Skip to content

Commit a829a84

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (ncr5380, lpfc, hisi_sas, megaraid_sas, ufs, ibmvscsis, mpt3sas). There's also an assortment of minor fixes, mostly in error legs or other not very user visible stuff. The major change is the pci_alloc_irq_vectors replacement for the old pci_msix_.. calls; this effectively makes IRQ mapping generic for the drivers and allows blk_mq to use the information" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (256 commits) scsi: qla4xxx: switch to pci_alloc_irq_vectors scsi: hisi_sas: support deferred probe for v2 hw scsi: megaraid_sas: switch to pci_alloc_irq_vectors scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices scsi: be2iscsi: set errno on error path scsi: be2iscsi: set errno on error path scsi: hpsa: fallback to use legacy REPORT PHYS command scsi: scsi_dh_alua: Fix RCU annotations scsi: hpsa: use %phN for short hex dumps scsi: hisi_sas: fix free'ing in probe and remove scsi: isci: switch to pci_alloc_irq_vectors scsi: ipr: Fix runaway IRQs when falling back from MSI to LSI scsi: dpt_i2o: double free on error path scsi: cxlflash: Migrate scsi command pointer to AFU command scsi: cxlflash: Migrate IOARRIN specific routines to function pointers scsi: cxlflash: Cleanup queuecommand() scsi: cxlflash: Cleanup send_tmf() scsi: cxlflash: Remove AFU command lock scsi: cxlflash: Wait for active AFU commands to timeout upon tear down scsi: cxlflash: Remove private command pool ...
2 parents 84b6079 + f5b893c commit a829a84

File tree

142 files changed

+5456
-4568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5456
-4568
lines changed

Documentation/devicetree/bindings/scsi/hisilicon-sas.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Main node required properties:
66
- compatible : value should be as follows:
77
(a) "hisilicon,hip05-sas-v1" for v1 hw in hip05 chipset
88
(b) "hisilicon,hip06-sas-v2" for v2 hw in hip06 chipset
9+
(c) "hisilicon,hip07-sas-v2" for v2 hw in hip07 chipset
910
- sas-addr : array of 8 bytes for host SAS address
1011
- reg : Address and length of the SAS register
1112
- hisilicon,sas-syscon: phandle of syscon used for sas control

Documentation/devicetree/bindings/ufs/ufs-qcom.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ To bind UFS PHY with UFS host controller, the controller node should
77
contain a phandle reference to UFS PHY node.
88

99
Required properties:
10-
- compatible : compatible list, contains "qcom,ufs-phy-qmp-20nm"
11-
or "qcom,ufs-phy-qmp-14nm" according to the relevant phy in use.
10+
- compatible : compatible list, contains one of the following -
11+
"qcom,ufs-phy-qmp-20nm" for 20nm ufs phy,
12+
"qcom,ufs-phy-qmp-14nm" for legacy 14nm ufs phy,
13+
"qcom,msm8996-ufs-phy-qmp-14nm" for 14nm ufs phy
14+
present on MSM8996 chipset.
1215
- reg : should contain PHY register address space (mandatory),
1316
- reg-names : indicates various resources passed to driver (via reg proptery) by name.
1417
Required "reg-names" is "phy_mem".

MAINTAINERS

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,15 +3192,15 @@ S: Supported
31923192
F: drivers/clocksource
31933193

31943194
CISCO FCOE HBA DRIVER
3195-
M: Hiral Patel <hiralpat@cisco.com>
3196-
M: Suma Ramars <sramars@cisco.com>
3197-
M: Brian Uchino <buchino@cisco.com>
3195+
M: Satish Kharat <satishkh@cisco.com>
3196+
M: Sesidhar Baddela <sebaddel@cisco.com>
3197+
M: Karan Tilak Kumar <kartilak@cisco.com>
31983198
L: linux-scsi@vger.kernel.org
31993199
S: Supported
32003200
F: drivers/scsi/fnic/
32013201

32023202
CISCO SCSI HBA DRIVER
3203-
M: Narsimhulu Musini <nmusini@cisco.com>
3203+
M: Karan Tilak Kumar <kartilak@cisco.com>
32043204
M: Sesidhar Baddela <sebaddel@cisco.com>
32053205
L: linux-scsi@vger.kernel.org
32063206
S: Supported
@@ -4787,11 +4787,11 @@ M: David Woodhouse <dwmw2@infradead.org>
47874787
L: linux-embedded@vger.kernel.org
47884788
S: Maintained
47894789

4790-
EMULEX/AVAGO LPFC FC/FCOE SCSI DRIVER
4791-
M: James Smart <james.smart@avagotech.com>
4792-
M: Dick Kennedy <dick.kennedy@avagotech.com>
4790+
EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER
4791+
M: James Smart <james.smart@broadcom.com>
4792+
M: Dick Kennedy <dick.kennedy@broadcom.com>
47934793
L: linux-scsi@vger.kernel.org
4794-
W: http://www.avagotech.com
4794+
W: http://www.broadcom.com
47954795
S: Supported
47964796
F: drivers/scsi/lpfc/
47974797

@@ -5717,7 +5717,6 @@ F: drivers/watchdog/hpwdt.c
57175717

57185718
HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
57195719
M: Don Brace <don.brace@microsemi.com>
5720-
L: iss_storagedev@hp.com
57215720
L: esc.storagedev@microsemi.com
57225721
L: linux-scsi@vger.kernel.org
57235722
S: Supported
@@ -5728,7 +5727,6 @@ F: include/uapi/linux/cciss*.h
57285727

57295728
HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
57305729
M: Don Brace <don.brace@microsemi.com>
5731-
L: iss_storagedev@hp.com
57325730
L: esc.storagedev@microsemi.com
57335731
L: linux-scsi@vger.kernel.org
57345732
S: Supported
@@ -7968,12 +7966,12 @@ S: Maintained
79687966
F: drivers/net/wireless/mediatek/mt7601u/
79697967

79707968
MEGARAID SCSI/SAS DRIVERS
7971-
M: Kashyap Desai <kashyap.desai@avagotech.com>
7972-
M: Sumit Saxena <sumit.saxena@avagotech.com>
7973-
M: Uday Lingala <uday.lingala@avagotech.com>
7974-
L: megaraidlinux.pdl@avagotech.com
7969+
M: Kashyap Desai <kashyap.desai@broadcom.com>
7970+
M: Sumit Saxena <sumit.saxena@broadcom.com>
7971+
M: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
7972+
L: megaraidlinux.pdl@broadcom.com
79757973
L: linux-scsi@vger.kernel.org
7976-
W: http://www.lsi.com
7974+
W: http://www.avagotech.com/support/
79777975
S: Maintained
79787976
F: Documentation/scsi/megaraid.txt
79797977
F: drivers/scsi/megaraid.*
@@ -8453,7 +8451,6 @@ F: drivers/scsi/arm/oak.c
84538451
F: drivers/scsi/atari_scsi.*
84548452
F: drivers/scsi/dmx3191d.c
84558453
F: drivers/scsi/g_NCR5380.*
8456-
F: drivers/scsi/g_NCR5380_mmio.c
84578454
F: drivers/scsi/mac_scsi.*
84588455
F: drivers/scsi/sun3_scsi.*
84598456
F: drivers/scsi/sun3_scsi_vme.c
@@ -12547,7 +12544,8 @@ F: Documentation/scsi/ufs.txt
1254712544
F: drivers/scsi/ufs/
1254812545

1254912546
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS
12550-
M: Joao Pinto <Joao.Pinto@synopsys.com>
12547+
M: Manjunath M Bettegowda <manjumb@synopsys.com>
12548+
M: Prabu Thangamuthu <prabut@synopsys.com>
1255112549
L: linux-scsi@vger.kernel.org
1255212550
S: Supported
1255312551
F: drivers/scsi/ufs/*dwc*

block/blk-mq-cpumap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ int blk_mq_map_queues(struct blk_mq_tag_set *set)
8787
free_cpumask_var(cpus);
8888
return 0;
8989
}
90+
EXPORT_SYMBOL_GPL(blk_mq_map_queues);
9091

9192
/*
9293
* We have no quick way of doing reverse lookups. This is only used at

block/blk-mq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ void blk_mq_disable_hotplug(void);
4242
/*
4343
* CPU -> queue mappings
4444
*/
45-
int blk_mq_map_queues(struct blk_mq_tag_set *set);
4645
extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
4746

4847
static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,

block/bsg-lib.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,32 @@
3232
* bsg_destroy_job - routine to teardown/delete a bsg job
3333
* @job: bsg_job that is to be torn down
3434
*/
35-
static void bsg_destroy_job(struct bsg_job *job)
35+
static void bsg_destroy_job(struct kref *kref)
3636
{
37+
struct bsg_job *job = container_of(kref, struct bsg_job, kref);
38+
struct request *rq = job->req;
39+
40+
blk_end_request_all(rq, rq->errors);
41+
3742
put_device(job->dev); /* release reference for the request */
3843

3944
kfree(job->request_payload.sg_list);
4045
kfree(job->reply_payload.sg_list);
4146
kfree(job);
4247
}
4348

49+
void bsg_job_put(struct bsg_job *job)
50+
{
51+
kref_put(&job->kref, bsg_destroy_job);
52+
}
53+
EXPORT_SYMBOL_GPL(bsg_job_put);
54+
55+
int bsg_job_get(struct bsg_job *job)
56+
{
57+
return kref_get_unless_zero(&job->kref);
58+
}
59+
EXPORT_SYMBOL_GPL(bsg_job_get);
60+
4461
/**
4562
* bsg_job_done - completion routine for bsg requests
4663
* @job: bsg_job that is complete
@@ -83,8 +100,7 @@ static void bsg_softirq_done(struct request *rq)
83100
{
84101
struct bsg_job *job = rq->special;
85102

86-
blk_end_request_all(rq, rq->errors);
87-
bsg_destroy_job(job);
103+
bsg_job_put(job);
88104
}
89105

90106
static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
@@ -142,6 +158,7 @@ static int bsg_create_job(struct device *dev, struct request *req)
142158
job->dev = dev;
143159
/* take a reference for the request */
144160
get_device(job->dev);
161+
kref_init(&job->kref);
145162
return 0;
146163

147164
failjob_rls_rqst_payload:

drivers/block/cciss_scsi.c

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -260,43 +260,6 @@ scsi_cmd_stack_free(ctlr_info_t *h)
260260
}
261261

262262
#if 0
263-
static int xmargin=8;
264-
static int amargin=60;
265-
266-
static void
267-
print_bytes (unsigned char *c, int len, int hex, int ascii)
268-
{
269-
270-
int i;
271-
unsigned char *x;
272-
273-
if (hex)
274-
{
275-
x = c;
276-
for (i=0;i<len;i++)
277-
{
278-
if ((i % xmargin) == 0 && i>0) printk("\n");
279-
if ((i % xmargin) == 0) printk("0x%04x:", i);
280-
printk(" %02x", *x);
281-
x++;
282-
}
283-
printk("\n");
284-
}
285-
if (ascii)
286-
{
287-
x = c;
288-
for (i=0;i<len;i++)
289-
{
290-
if ((i % amargin) == 0 && i>0) printk("\n");
291-
if ((i % amargin) == 0) printk("0x%04x:", i);
292-
if (*x > 26 && *x < 128) printk("%c", *x);
293-
else printk(".");
294-
x++;
295-
}
296-
printk("\n");
297-
}
298-
}
299-
300263
static void
301264
print_cmd(CommandList_struct *cp)
302265
{
@@ -305,30 +268,13 @@ print_cmd(CommandList_struct *cp)
305268
printk("sgtot:%d\n", cp->Header.SGTotal);
306269
printk("Tag:0x%08x/0x%08x\n", cp->Header.Tag.upper,
307270
cp->Header.Tag.lower);
308-
printk("LUN:0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
309-
cp->Header.LUN.LunAddrBytes[0],
310-
cp->Header.LUN.LunAddrBytes[1],
311-
cp->Header.LUN.LunAddrBytes[2],
312-
cp->Header.LUN.LunAddrBytes[3],
313-
cp->Header.LUN.LunAddrBytes[4],
314-
cp->Header.LUN.LunAddrBytes[5],
315-
cp->Header.LUN.LunAddrBytes[6],
316-
cp->Header.LUN.LunAddrBytes[7]);
271+
printk("LUN:0x%8phN\n", cp->Header.LUN.LunAddrBytes);
317272
printk("CDBLen:%d\n", cp->Request.CDBLen);
318273
printk("Type:%d\n",cp->Request.Type.Type);
319274
printk("Attr:%d\n",cp->Request.Type.Attribute);
320275
printk(" Dir:%d\n",cp->Request.Type.Direction);
321276
printk("Timeout:%d\n",cp->Request.Timeout);
322-
printk( "CDB: %02x %02x %02x %02x %02x %02x %02x %02x"
323-
" %02x %02x %02x %02x %02x %02x %02x %02x\n",
324-
cp->Request.CDB[0], cp->Request.CDB[1],
325-
cp->Request.CDB[2], cp->Request.CDB[3],
326-
cp->Request.CDB[4], cp->Request.CDB[5],
327-
cp->Request.CDB[6], cp->Request.CDB[7],
328-
cp->Request.CDB[8], cp->Request.CDB[9],
329-
cp->Request.CDB[10], cp->Request.CDB[11],
330-
cp->Request.CDB[12], cp->Request.CDB[13],
331-
cp->Request.CDB[14], cp->Request.CDB[15]),
277+
printk("CDB: %16ph\n", cp->Request.CDB);
332278
printk("edesc.Addr: 0x%08x/0%08x, Len = %d\n",
333279
cp->ErrDesc.Addr.upper, cp->ErrDesc.Addr.lower,
334280
cp->ErrDesc.Len);
@@ -340,9 +286,7 @@ print_cmd(CommandList_struct *cp)
340286
printk("offense size:%d\n", cp->err_info->MoreErrInfo.Invalid_Cmd.offense_size);
341287
printk("offense byte:%d\n", cp->err_info->MoreErrInfo.Invalid_Cmd.offense_num);
342288
printk("offense value:%d\n", cp->err_info->MoreErrInfo.Invalid_Cmd.offense_value);
343-
344289
}
345-
346290
#endif
347291

348292
static int
@@ -782,8 +726,10 @@ static void complete_scsi_command(CommandList_struct *c, int timeout,
782726
"reported\n", c);
783727
break;
784728
case CMD_INVALID: {
785-
/* print_bytes(c, sizeof(*c), 1, 0);
786-
print_cmd(c); */
729+
/*
730+
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, c, sizeof(*c), false);
731+
print_cmd(c);
732+
*/
787733
/* We get CMD_INVALID if you address a non-existent tape drive instead
788734
of a selection timeout (no response). You will see this if you yank
789735
out a tape drive, then try to access it. This is kind of a shame
@@ -985,8 +931,10 @@ cciss_scsi_interpret_error(ctlr_info_t *h, CommandList_struct *c)
985931
dev_warn(&h->pdev->dev,
986932
"%p is reported invalid (probably means "
987933
"target device no longer present)\n", c);
988-
/* print_bytes((unsigned char *) c, sizeof(*c), 1, 0);
989-
print_cmd(c); */
934+
/*
935+
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, c, sizeof(*c), false);
936+
print_cmd(c);
937+
*/
990938
}
991939
break;
992940
case CMD_PROTOCOL_ERR:

drivers/message/fusion/mptbase.c

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,10 +2585,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
25852585
(void) GetLanConfigPages(ioc);
25862586
a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
25872587
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
2588-
"LanAddr = %02X:%02X:%02X"
2589-
":%02X:%02X:%02X\n",
2590-
ioc->name, a[5], a[4],
2591-
a[3], a[2], a[1], a[0]));
2588+
"LanAddr = %pMR\n", ioc->name, a));
25922589
}
25932590
break;
25942591

@@ -2868,21 +2865,21 @@ MptDisplayIocCapabilities(MPT_ADAPTER *ioc)
28682865

28692866
printk(KERN_INFO "%s: ", ioc->name);
28702867
if (ioc->prod_name)
2871-
printk("%s: ", ioc->prod_name);
2872-
printk("Capabilities={");
2868+
pr_cont("%s: ", ioc->prod_name);
2869+
pr_cont("Capabilities={");
28732870

28742871
if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_INITIATOR) {
2875-
printk("Initiator");
2872+
pr_cont("Initiator");
28762873
i++;
28772874
}
28782875

28792876
if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) {
2880-
printk("%sTarget", i ? "," : "");
2877+
pr_cont("%sTarget", i ? "," : "");
28812878
i++;
28822879
}
28832880

28842881
if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
2885-
printk("%sLAN", i ? "," : "");
2882+
pr_cont("%sLAN", i ? "," : "");
28862883
i++;
28872884
}
28882885

@@ -2891,12 +2888,12 @@ MptDisplayIocCapabilities(MPT_ADAPTER *ioc)
28912888
* This would probably evoke more questions than it's worth
28922889
*/
28932890
if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) {
2894-
printk("%sLogBusAddr", i ? "," : "");
2891+
pr_cont("%sLogBusAddr", i ? "," : "");
28952892
i++;
28962893
}
28972894
#endif
28982895

2899-
printk("}\n");
2896+
pr_cont("}\n");
29002897
}
29012898

29022899
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -6783,8 +6780,7 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
67836780
if (ioc->bus_type == FC) {
67846781
if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
67856782
u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
6786-
seq_printf(m, " LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
6787-
a[5], a[4], a[3], a[2], a[1], a[0]);
6783+
seq_printf(m, " LanAddr = %pMR\n", a);
67886784
}
67896785
seq_printf(m, " WWN = %08X%08X:%08X%08X\n",
67906786
ioc->fc_port_page0[p].WWNN.High,
@@ -6861,8 +6857,7 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh
68616857

68626858
if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
68636859
u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
6864-
y += sprintf(buffer+len+y, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
6865-
a[5], a[4], a[3], a[2], a[1], a[0]);
6860+
y += sprintf(buffer+len+y, ", LanAddr=%pMR", a);
68666861
}
68676862

68686863
y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq);
@@ -6896,8 +6891,7 @@ static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int
68966891

68976892
if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
68986893
u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
6899-
seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
6900-
a[5], a[4], a[3], a[2], a[1], a[0]);
6894+
seq_printf(m, ", LanAddr=%pMR", a);
69016895
}
69026896

69036897
seq_printf(m, ", IRQ=%d", ioc->pci_irq);

drivers/message/fusion/mptscsih.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,15 +1366,10 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt)
13661366
/* Default to untagged. Once a target structure has been allocated,
13671367
* use the Inquiry data to determine if device supports tagged.
13681368
*/
1369-
if ((vdevice->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)
1370-
&& (SCpnt->device->tagged_supported)) {
1369+
if ((vdevice->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES) &&
1370+
SCpnt->device->tagged_supported)
13711371
scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ;
1372-
if (SCpnt->request && SCpnt->request->ioprio) {
1373-
if (((SCpnt->request->ioprio & 0x7) == 1) ||
1374-
!(SCpnt->request->ioprio & 0x7))
1375-
scsictl |= MPI_SCSIIO_CONTROL_HEADOFQ;
1376-
}
1377-
} else
1372+
else
13781373
scsictl = scsidir | MPI_SCSIIO_CONTROL_UNTAGGED;
13791374

13801375

0 commit comments

Comments
 (0)