Skip to content

Commit 5b13966

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "This is a set of five fixes: Two MAINTAINER email updates (urgent because the non-avagotech emails will start bouncing) an lpfc big endian oops fix, a 256 byte sector hang fix (to eliminate 256 byte sectors) and a storvsc fix which could cause test unit ready failures on bringup" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: MAINTAINERS: Revise lpfc maintainers for Avago Technologies ownership of Emulex MAINTAINERS, be2iscsi: change email domain sd: Disable support for 256 byte/sector disks lpfc: Fix breakage on big endian kernels storvsc: Set the SRB flags correctly when no data transfer is needed
2 parents c5db6a3 + 3250587 commit 5b13966

File tree

13 files changed

+71
-77
lines changed

13 files changed

+71
-77
lines changed

MAINTAINERS

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3825,10 +3825,11 @@ M: David Woodhouse <[email protected]>
38253825
38263826
S: Maintained
38273827

3828-
EMULEX LPFC FC SCSI DRIVER
3829-
M: James Smart <[email protected]>
3828+
EMULEX/AVAGO LPFC FC/FCOE SCSI DRIVER
3829+
M: James Smart <[email protected]>
3830+
M: Dick Kennedy <[email protected]>
38303831
3831-
W: http://sourceforge.net/projects/lpfcxxxx
3832+
W: http://www.avagotech.com
38323833
S: Supported
38333834
F: drivers/scsi/lpfc/
38343835

@@ -8829,9 +8830,11 @@ F: drivers/misc/phantom.c
88298830
F: include/uapi/linux/phantom.h
88308831

88318832
SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
8832-
M: Jayamohan Kallickal <[email protected]>
8833+
M: Jayamohan Kallickal <[email protected]>
8834+
M: Minh Tran <[email protected]>
8835+
M: John Soni Jose <[email protected]>
88338836
8834-
W: http://www.emulex.com
8837+
W: http://www.avagotech.com
88358838
S: Supported
88368839
F: drivers/scsi/be2iscsi/
88378840

drivers/scsi/be2iscsi/be.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
@@ -8,9 +8,9 @@
88
* Public License is included in this distribution in the file called COPYING.
99
*
1010
* Contact Information:
11-
* linux-drivers@emulex.com
11+
* linux-drivers@avagotech.com
1212
*
13-
* Emulex
13+
* Avago Technologies
1414
* 3333 Susan Street
1515
* Costa Mesa, CA 92626
1616
*/

drivers/scsi/be2iscsi/be_cmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
@@ -8,9 +8,9 @@
88
* Public License is included in this distribution in the file called COPYING.
99
*
1010
* Contact Information:
11-
* linux-drivers@emulex.com
11+
* linux-drivers@avagotech.com
1212
*
13-
* Emulex
13+
* Avago Technologies
1414
* 3333 Susan Street
1515
* Costa Mesa, CA 92626
1616
*/

drivers/scsi/be2iscsi/be_cmds.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
@@ -8,9 +8,9 @@
88
* Public License is included in this distribution in the file called COPYING.
99
*
1010
* Contact Information:
11-
* linux-drivers@emulex.com
11+
* linux-drivers@avagotech.com
1212
*
13-
* Emulex
13+
* Avago Technologies
1414
* 3333 Susan Street
1515
* Costa Mesa, CA 92626
1616
*/

drivers/scsi/be2iscsi/be_iscsi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/

drivers/scsi/be2iscsi/be_iscsi.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/

drivers/scsi/be2iscsi/be_main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/
@@ -50,7 +50,7 @@ static unsigned int enable_msix = 1;
5050

5151
MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR);
5252
MODULE_VERSION(BUILD_STR);
53-
MODULE_AUTHOR("Emulex Corporation");
53+
MODULE_AUTHOR("Avago Technologies");
5454
MODULE_LICENSE("GPL");
5555
module_param(be_iopoll_budget, int, 0);
5656
module_param(enable_msix, int, 0);
@@ -552,7 +552,7 @@ MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table);
552552

553553
static struct scsi_host_template beiscsi_sht = {
554554
.module = THIS_MODULE,
555-
.name = "Emulex 10Gbe open-iscsi Initiator Driver",
555+
.name = "Avago Technologies 10Gbe open-iscsi Initiator Driver",
556556
.proc_name = DRV_NAME,
557557
.queuecommand = iscsi_queuecommand,
558558
.change_queue_depth = scsi_change_queue_depth,

drivers/scsi/be2iscsi/be_main.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/
@@ -37,7 +37,7 @@
3737

3838
#define DRV_NAME "be2iscsi"
3939
#define BUILD_STR "10.4.114.0"
40-
#define BE_NAME "Emulex OneConnect" \
40+
#define BE_NAME "Avago Technologies OneConnect" \
4141
"Open-iSCSI Driver version" BUILD_STR
4242
#define DRV_DESC BE_NAME " " "Driver"
4343

drivers/scsi/be2iscsi/be_mgmt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/

drivers/scsi/be2iscsi/be_mgmt.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/**
2-
* Copyright (C) 2005 - 2014 Emulex
2+
* Copyright (C) 2005 - 2015 Avago Technologies
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License version 2
77
* as published by the Free Software Foundation. The full GNU General
88
* Public License is included in this distribution in the file called COPYING.
99
*
10-
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
10+
* Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
1111
*
1212
* Contact Information:
13-
* linux-drivers@emulex.com
13+
* linux-drivers@avagotech.com
1414
*
15-
* Emulex
15+
* Avago Technologies
1616
* 3333 Susan Street
1717
* Costa Mesa, CA 92626
1818
*/

drivers/scsi/lpfc/lpfc_scsi.c

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,25 +1129,6 @@ lpfc_release_scsi_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb)
11291129
phba->lpfc_release_scsi_buf(phba, psb);
11301130
}
11311131

1132-
/**
1133-
* lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB
1134-
* @data: A pointer to the immediate command data portion of the IOCB.
1135-
* @fcp_cmnd: The FCP Command that is provided by the SCSI layer.
1136-
*
1137-
* The routine copies the entire FCP command from @fcp_cmnd to @data while
1138-
* byte swapping the data to big endian format for transmission on the wire.
1139-
**/
1140-
static void
1141-
lpfc_fcpcmd_to_iocb(uint8_t *data, struct fcp_cmnd *fcp_cmnd)
1142-
{
1143-
int i, j;
1144-
1145-
for (i = 0, j = 0; i < sizeof(struct fcp_cmnd);
1146-
i += sizeof(uint32_t), j++) {
1147-
((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]);
1148-
}
1149-
}
1150-
11511132
/**
11521133
* lpfc_scsi_prep_dma_buf_s3 - DMA mapping for scsi buffer to SLI3 IF spec
11531134
* @phba: The Hba for which this call is being executed.
@@ -1283,7 +1264,6 @@ lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
12831264
* we need to set word 4 of IOCB here
12841265
*/
12851266
iocb_cmd->un.fcpi.fcpi_parm = scsi_bufflen(scsi_cmnd);
1286-
lpfc_fcpcmd_to_iocb(iocb_cmd->unsli3.fcp_ext.icd, fcp_cmnd);
12871267
return 0;
12881268
}
12891269

@@ -4146,6 +4126,24 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
41464126
lpfc_release_scsi_buf(phba, lpfc_cmd);
41474127
}
41484128

4129+
/**
4130+
* lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB
4131+
* @data: A pointer to the immediate command data portion of the IOCB.
4132+
* @fcp_cmnd: The FCP Command that is provided by the SCSI layer.
4133+
*
4134+
* The routine copies the entire FCP command from @fcp_cmnd to @data while
4135+
* byte swapping the data to big endian format for transmission on the wire.
4136+
**/
4137+
static void
4138+
lpfc_fcpcmd_to_iocb(uint8_t *data, struct fcp_cmnd *fcp_cmnd)
4139+
{
4140+
int i, j;
4141+
for (i = 0, j = 0; i < sizeof(struct fcp_cmnd);
4142+
i += sizeof(uint32_t), j++) {
4143+
((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]);
4144+
}
4145+
}
4146+
41494147
/**
41504148
* lpfc_scsi_prep_cmnd - Wrapper func for convert scsi cmnd to FCP info unit
41514149
* @vport: The virtual port for which this call is being executed.
@@ -4225,6 +4223,9 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
42254223
fcp_cmnd->fcpCntl3 = 0;
42264224
phba->fc4ControlRequests++;
42274225
}
4226+
if (phba->sli_rev == 3 &&
4227+
!(phba->sli3_options & LPFC_SLI3_BG_ENABLED))
4228+
lpfc_fcpcmd_to_iocb(iocb_cmd->unsli3.fcp_ext.icd, fcp_cmnd);
42284229
/*
42294230
* Finish initializing those IOCB fields that are independent
42304231
* of the scsi_cmnd request_buffer

drivers/scsi/sd.c

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)
16001600
{
16011601
u64 start_lba = blk_rq_pos(scmd->request);
16021602
u64 end_lba = blk_rq_pos(scmd->request) + (scsi_bufflen(scmd) / 512);
1603+
u64 factor = scmd->device->sector_size / 512;
16031604
u64 bad_lba;
16041605
int info_valid;
16051606
/*
@@ -1621,16 +1622,9 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)
16211622
if (scsi_bufflen(scmd) <= scmd->device->sector_size)
16221623
return 0;
16231624

1624-
if (scmd->device->sector_size < 512) {
1625-
/* only legitimate sector_size here is 256 */
1626-
start_lba <<= 1;
1627-
end_lba <<= 1;
1628-
} else {
1629-
/* be careful ... don't want any overflows */
1630-
unsigned int factor = scmd->device->sector_size / 512;
1631-
do_div(start_lba, factor);
1632-
do_div(end_lba, factor);
1633-
}
1625+
/* be careful ... don't want any overflows */
1626+
do_div(start_lba, factor);
1627+
do_div(end_lba, factor);
16341628

16351629
/* The bad lba was reported incorrectly, we have no idea where
16361630
* the error is.
@@ -2188,8 +2182,7 @@ sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer)
21882182
if (sector_size != 512 &&
21892183
sector_size != 1024 &&
21902184
sector_size != 2048 &&
2191-
sector_size != 4096 &&
2192-
sector_size != 256) {
2185+
sector_size != 4096) {
21932186
sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size %d.\n",
21942187
sector_size);
21952188
/*
@@ -2244,8 +2237,6 @@ sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer)
22442237
sdkp->capacity <<= 2;
22452238
else if (sector_size == 1024)
22462239
sdkp->capacity <<= 1;
2247-
else if (sector_size == 256)
2248-
sdkp->capacity >>= 1;
22492240

22502241
blk_queue_physical_block_size(sdp->request_queue,
22512242
sdkp->physical_block_size);

drivers/scsi/storvsc_drv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,8 +1600,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
16001600
break;
16011601
default:
16021602
vm_srb->data_in = UNKNOWN_TYPE;
1603-
vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN |
1604-
SRB_FLAGS_DATA_OUT);
1603+
vm_srb->win8_extension.srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER;
16051604
break;
16061605
}
16071606

0 commit comments

Comments
 (0)