[Bug 196543] New: Adaptec 6405H can not understand Queue full message from Disks.

2017-07-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=196543

Bug ID: 196543
   Summary: Adaptec 6405H can not understand Queue full message
from Disks.
   Product: IO/Storage
   Version: 2.5
Kernel Version: 4.11.11(Fedora26 Kernel)/3.10.0(RHEL 7.3)
  Hardware: x86-64
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: SCSI
  Assignee: linux-scsi@vger.kernel.org
  Reporter: kiyomi.kakitsub...@gmail.com
Regression: No

Hi

I happened something different caused by SAS HBA.
Adaptec 6405H can not understand Queue full message send by Disks.

Perhaps, normally, any other HBA receive Queue full message from SAS disks,
it will wait send some command to disks.
But Adaptec 6405H is not wait send command to disks,
so, happen disk time out.

I think driver or firmware's bug,because other HBA like using mpt3sas ,
is not happened.

If you need,perhaps I will give SAS bus trace.

Cheers.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[PATCH] qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)

2017-07-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 

This patch drops two incorrect usages of tcm_qla2xxx_free_cmd()
during TMR ABORT within tcm_qla2xxx_handle_data_work() and
tcm_qla2xxx_aborted_task(), which where attempting to dispatch
into workqueue context to do tcm_qla2xxx_complete_free() and
subsequently invoke transport_generic_free_cmd().

This is incorrect because during TMR ABORT target-core will
drop the outstanding se_cmd->cmd_kref references once it has
quiesced the se_cmd via transport_wait_for_tasks(), and in
the case of qla2xxx it should not attempt to do it's own
transport_generic_free_cmd() once the abort has occured.

As reported by Pascal, this was originally manifesting as a
BUG_ON(cmd->cmd_in_wq) in qlt_free_cmd() during TMR ABORT,
with a LIO backend that had sufficently high enough WRITE
latency to trigger a host side TMR ABORT_TASK.

(v2: Drop the qla_tgt_cmd->write_pending_abort_comp changes,
 as they will be addressed in a seperate series)

Reported-by: Pascal de Bruijn 
Tested-by: Pascal de Bruijn 
Cc: Pascal de Bruijn 
Reported-by: Lukasz Engel 
Cc: Lukasz Engel 
Acked-by: Himanshu Madhani 
Cc: Quinn Tran 
Signed-off-by: Nicholas Bellinger 
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 30 --
 1 file changed, 30 deletions(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c 
b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index b20da0d..3f82ea1 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -500,7 +500,6 @@ static int tcm_qla2xxx_handle_cmd(scsi_qla_host_t *vha, 
struct qla_tgt_cmd *cmd,
 static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
 {
struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work);
-   unsigned long flags;
 
/*
 * Ensure that the complete FCP WRITE payload has been received.
@@ -508,17 +507,6 @@ static void tcm_qla2xxx_handle_data_work(struct 
work_struct *work)
 */
cmd->cmd_in_wq = 0;
 
-   spin_lock_irqsave(>cmd_lock, flags);
-   cmd->data_work = 1;
-   if (cmd->aborted) {
-   cmd->data_work_free = 1;
-   spin_unlock_irqrestore(>cmd_lock, flags);
-
-   tcm_qla2xxx_free_cmd(cmd);
-   return;
-   }
-   spin_unlock_irqrestore(>cmd_lock, flags);
-
cmd->qpair->tgt_counters.qla_core_ret_ctio++;
if (!cmd->write_data_transferred) {
/*
@@ -765,31 +753,13 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd 
*se_cmd)
qlt_xmit_tm_rsp(mcmd);
 }
 
-#define DATA_WORK_NOT_FREE(_cmd) (_cmd->data_work && !_cmd->data_work_free)
 static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
 {
struct qla_tgt_cmd *cmd = container_of(se_cmd,
struct qla_tgt_cmd, se_cmd);
-   unsigned long flags;
 
if (qlt_abort_cmd(cmd))
return;
-
-   spin_lock_irqsave(>cmd_lock, flags);
-   if ((cmd->state == QLA_TGT_STATE_NEW)||
-   ((cmd->state == QLA_TGT_STATE_DATA_IN) &&
-   DATA_WORK_NOT_FREE(cmd))) {
-   cmd->data_work_free = 1;
-   spin_unlock_irqrestore(>cmd_lock, flags);
-   /*
-* cmd has not reached fw, Use this trigger to free it.
-*/
-   tcm_qla2xxx_free_cmd(cmd);
-   return;
-   }
-   spin_unlock_irqrestore(>cmd_lock, flags);
-   return;
-
 }
 
 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *,
-- 
1.9.1



Re: [PATCH] tcmu: clean up the scatter helper

2017-07-30 Thread Nicholas A. Bellinger
On Thu, 2017-07-13 at 14:33 +0800, lixi...@cmss.chinamobile.com wrote:
> From: Xiubo Li 
> 
> Add some comments to make the scatter code to be more readable.
> 
> Signed-off-by: Xiubo Li 
> ---
>  drivers/target/target_core_user.c | 30 +-
>  1 file changed, 25 insertions(+), 5 deletions(-)
> 

Applied to target-pending/for-next.

Thanks Xiubo + MNC.



Re: [PATCH] tcmu: Fix possible to/from address overflow when doing the memcpy

2017-07-30 Thread Nicholas A. Bellinger
On Wed, 2017-07-12 at 15:51 +0800, lixi...@cmss.chinamobile.com wrote:
> From: Xiubo Li 
> 
> For most case the sg->length equals to PAGE_SIZE, so this bug won't
> be triggered. Otherwise this will crash the kernel, for example when
> all segments' sg->length equal to 1K.
> 
> Signed-off-by: Xiubo Li 
> ---
>  drivers/target/target_core_user.c | 11 +--
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 

Applied to target-pending/master.

Thankx Xiubo + MNC.



Re: [PATCHv2] tcmu: Add fifo type waiter list support to avoid starvation

2017-07-30 Thread Nicholas A. Bellinger
Hi Xiubo,

Apologies for the delayed response.  Comments below.

On Wed, 2017-07-12 at 15:16 +0800, lixi...@cmss.chinamobile.com wrote:
> From: Xiubo Li 
> 
> The fifo type waiter list will hold the udevs who are waiting for the
> blocks from the data global pool. The unmap thread will try to feed the
> first udevs in waiter list, if the global free blocks available are
> not enough, it will stop traversing the list and abort waking up the
> others.
> 
> Signed-off-by: Xiubo Li 
> ---
>  drivers/target/target_core_user.c | 104 
> --
>  1 file changed, 88 insertions(+), 16 deletions(-)
> 

Applied to target-pending/for-next.

Thanks Xiubo + MNC.



[PATCH 22/29] scsi: pmcraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 1cc814f..1a9e153 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -126,7 +126,7 @@ static struct pmcraid_chip_details pmcraid_chip_cfg[] = {
 /*
  * PCI device ids supported by pmcraid driver
  */
-static struct pci_device_id pmcraid_pci_table[] = {
+static const struct pci_device_id pmcraid_pci_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID),
  0, 0, (kernel_ulong_t)_chip_cfg[0]
},
-- 
2.7.4



[PATCH 23/29] scsi: fnic: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/fnic/fnic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index aacadbf..b3ab344 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -53,7 +53,7 @@ LIST_HEAD(fnic_list);
 DEFINE_SPINLOCK(fnic_list_lock);
 
 /* Supported devices by fnic module */
-static struct pci_device_id fnic_id_table[] = {
+static const struct pci_device_id fnic_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_FNIC) },
{ 0, }
 };
-- 
2.7.4



[PATCH 24/29] scsi: stex: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/stex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 9b20643..21d0495 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1491,7 +1491,7 @@ static struct scsi_host_template driver_template = {
.this_id= -1,
 };
 
-static struct pci_device_id stex_pci_tbl[] = {
+static const struct pci_device_id stex_pci_tbl[] = {
/* st_shasta */
{ 0x105a, 0x8350, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
st_shasta }, /* SuperTrak EX8350/8300/16350/16300 */
-- 
2.7.4



[PATCH 28/29] scsi: atp870u: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/atp870u.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 8b52a9d..70f1bc4 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -1685,7 +1685,7 @@ static struct scsi_host_template atp870u_template = {
  .max_sectors  = ATP870U_MAX_SECTORS,
 };
 
-static struct pci_device_id atp870u_id_table[] = {
+static const struct pci_device_id atp870u_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP885_DEVID)   },
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP880_DEVID1)
  },
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP880_DEVID2)
  },
-- 
2.7.4



[PATCH 27/29] scsi: advansys: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/advansys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 24e57e7..350070f 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11714,7 +11714,7 @@ static struct eisa_driver advansys_eisa_driver = {
 };
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id advansys_pci_tbl[] = {
+static const struct pci_device_id advansys_pci_tbl[] = {
{PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A,
 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940,
-- 
2.7.4



[PATCH 25/29] scsi: megaraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 316c3df..ed2acda 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -124,7 +124,7 @@ static int megasas_get_target_prop(struct megasas_instance 
*instance,
 /*
  * PCI ID table for all supported controllers
  */
-static struct pci_device_id megasas_pci_table[] = {
+static const struct pci_device_id megasas_pci_table[] = {
 
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1064R)},
/* xscale IOP */
-- 
2.7.4



[PATCH 26/29] scsi: a100u2w: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/a100u2w.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 8086bd0..80c39fd 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1209,7 +1209,7 @@ static void inia100_remove_one(struct pci_dev *pdev)
scsi_host_put(shost);
 } 
 
-static struct pci_device_id inia100_pci_tbl[] = {
+static const struct pci_device_id inia100_pci_tbl[] = {
{PCI_VENDOR_ID_INIT, 0x1060, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
 };
-- 
2.7.4



[PATCH 29/29] scsi: 3w-xxxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/3w-.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c
index 33261b6..e0b079d 100644
--- a/drivers/scsi/3w-.c
+++ b/drivers/scsi/3w-.c
@@ -2384,7 +2384,7 @@ static void tw_remove(struct pci_dev *pdev)
 } /* End tw_remove() */
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id tw_pci_tbl[] = {
+static const struct pci_device_id tw_pci_tbl[] = {
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000,
  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000,
-- 
2.7.4



[PATCH 21/29] scsi: nsp32: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/nsp32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 53c8477..1430b3c 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -76,7 +76,7 @@ static const char *nsp32_release_version = "1.2";
 /
  * Supported hardware
  */
-static struct pci_device_id nsp32_pci_table[] = {
+static const struct pci_device_id nsp32_pci_table[] = {
{
.vendor  = PCI_VENDOR_ID_IODATA,
.device  = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II,
-- 
2.7.4



[PATCH 12/29] scsi: hptiop: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/hptiop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 7226226..31415b8 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -1647,7 +1647,7 @@ static struct hptiop_adapter_ops hptiop_mvfrey_ops = {
.host_phy_flag = cpu_to_le64(1),
 };
 
-static struct pci_device_id hptiop_id_table[] = {
+static const struct pci_device_id hptiop_id_table[] = {
{ PCI_VDEVICE(TTI, 0x3220), (kernel_ulong_t)_itl_ops },
{ PCI_VDEVICE(TTI, 0x3320), (kernel_ulong_t)_itl_ops },
{ PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)_itl_ops },
-- 
2.7.4



[PATCH 13/29] scsi: fdomain: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/fdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index b87ab38..d46cbe8 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -1770,7 +1770,7 @@ struct scsi_host_template fdomain_driver_template = {
 #ifndef PCMCIA
 #if defined(CONFIG_PCI) && defined(MODULE)
 
-static struct pci_device_id fdomain_pci_tbl[] = {
+static const struct pci_device_id fdomain_pci_tbl[] = {
{ PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70,
  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ }
-- 
2.7.4



[PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c 
b/drivers/scsi/sym53c8xx_2/sym_glue.c
index d32e3ba..6934265 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2000,7 +2000,7 @@ static struct spi_function_template 
sym2_transport_functions = {
.get_signalling = sym2_get_signalling,
 };
 
-static struct pci_device_id sym2_id_table[] = {
+static const struct pci_device_id sym2_id_table[] = {
{ PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810,
  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820,
-- 
2.7.4



[PATCH 14/29] scsi: snic: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/snic/snic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c
index 7cf70aa..74031e4 100644
--- a/drivers/scsi/snic/snic_main.c
+++ b/drivers/scsi/snic/snic_main.c
@@ -35,7 +35,7 @@
 #define PCI_DEVICE_ID_CISCO_SNIC   0x0046
 
 /* Supported devices by snic module */
-static struct pci_device_id snic_id_table[] = {
+static const struct pci_device_id snic_id_table[] = {
{PCI_DEVICE(0x1137, PCI_DEVICE_ID_CISCO_SNIC) },
{ 0, }  /* end of table */
 };
-- 
2.7.4



[PATCH 17/29] scsi: qla2xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index df57655..2ee8e86 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -6494,7 +6494,7 @@ static const struct pci_error_handlers 
qla2xxx_err_handler = {
.resume = qla2xxx_pci_resume,
 };
 
-static struct pci_device_id qla2xxx_pci_tbl[] = {
+static const struct pci_device_id qla2xxx_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2300) },
-- 
2.7.4



[PATCH 19/29] scsi: megaraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/megaraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3c63c29..17012c8 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4652,7 +4652,7 @@ megaraid_shutdown(struct pci_dev *pdev)
__megaraid_shutdown(adapter);
 }
 
-static struct pci_device_id megaraid_pci_tbl[] = {
+static const struct pci_device_id megaraid_pci_tbl[] = {
{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
-- 
2.7.4



[PATCH 16/29] scsi: esas2r: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/esas2r/esas2r_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/esas2r/esas2r_main.c 
b/drivers/scsi/esas2r/esas2r_main.c
index f2e9d8a..81f226b 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -309,7 +309,7 @@ MODULE_PARM_DESC(interrupt_mode,
 "Defines the interrupt mode to use.  0 for legacy"
 ", 1 for MSI.  Default is MSI (1).");
 
-static struct pci_device_id
+static const struct pci_device_id
esas2r_pci_table[] = {
{ ATTO_VENDOR_ID, 0x0049, ATTO_VENDOR_ID, 0x0049,
  0,
-- 
2.7.4



[PATCH 18/29] scsi: dmx3191d: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/dmx3191d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
index 6af3394..805ae59 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -139,7 +139,7 @@ static void dmx3191d_remove_one(struct pci_dev *pdev)
pci_disable_device(pdev);
 }
 
-static struct pci_device_id dmx3191d_pci_tbl[] = {
+static const struct pci_device_id dmx3191d_pci_tbl[] = {
{PCI_VENDOR_ID_DOMEX, PCI_DEVICE_ID_DOMEX_DMX3191D,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ }
-- 
2.7.4



[PATCH 20/29] scsi: cxlflash: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/cxlflash/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 077f62e..88bd551 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -3155,7 +3155,7 @@ static struct dev_dependent_vals dev_briard_vals = { 
CXLFLASH_MAX_SECTORS,
 /*
  * PCI device binding table
  */
-static struct pci_device_id cxlflash_pci_table[] = {
+static const struct pci_device_id cxlflash_pci_table[] = {
{PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CORSA,
 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (kernel_ulong_t)_corsa_vals},
{PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_FLASH_GT,
-- 
2.7.4



[PATCH 11/29] scsi: 3w-sas: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/3w-sas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index b150e13..e771e86 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -1847,7 +1847,7 @@ static int twl_resume(struct pci_dev *pdev)
 #endif
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id twl_pci_tbl[] = {
+static const struct pci_device_id twl_pci_tbl[] = {
{ PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) },
{ }
 };
-- 
2.7.4



[PATCH 03/29] scsi: am53c974: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/am53c974.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c
index beea30e..ffc49d0 100644
--- a/drivers/scsi/am53c974.c
+++ b/drivers/scsi/am53c974.c
@@ -542,7 +542,7 @@ static void pci_esp_remove_one(struct pci_dev *pdev)
scsi_host_put(esp->host);
 }
 
-static struct pci_device_id am53c974_pci_tbl[] = {
+static const struct pci_device_id am53c974_pci_tbl[] = {
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_SCSI,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ }
-- 
2.7.4



[PATCH 01/29] scsi: qla1280: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/qla1280.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 8a29fb0..265a65b 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -537,7 +537,7 @@ struct qla_boards {
 };
 
 /* NOTE: the last argument in each entry is used to index ql1280_board_tbl */
-static struct pci_device_id qla1280_pci_tbl[] = {
+static const struct pci_device_id qla1280_pci_tbl[] = {
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP12160,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020,
-- 
2.7.4



[PATCH 02/29] scsi: qedi: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/qedi/qedi_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 5f5a4ef..3880bf8 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -2004,7 +2004,7 @@ static void qedi_remove(struct pci_dev *pdev)
__qedi_remove(pdev, QEDI_MODE_NORMAL);
 }
 
-static struct pci_device_id qedi_pci_tbl[] = {
+static const struct pci_device_id qedi_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, 0x165E) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, 0x8084) },
{ 0 },
-- 
2.7.4



[PATCH 04/29] scsi: pm8001: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/pm8001/pm8001_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c 
b/drivers/scsi/pm8001/pm8001_init.c
index 034b2f7..f2757cc 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -1270,7 +1270,7 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
 /* update of pci device, vendor id and driver data with
  * unique value for each of the controller
  */
-static struct pci_device_id pm8001_pci_table[] = {
+static const struct pci_device_id pm8001_pci_table[] = {
{ PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001 },
{ PCI_VDEVICE(PMC_Sierra, 0x8006), chip_8006 },
{ PCI_VDEVICE(ADAPTEC2, 0x8006), chip_8006 },
-- 
2.7.4



[PATCH 07/29] scsi: 3w-9xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/3w-9xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 00e7968..27fa387 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2274,7 +2274,7 @@ static int twa_resume(struct pci_dev *pdev)
 #endif
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id twa_pci_tbl[] = {
+static const struct pci_device_id twa_pci_tbl[] = {
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000,
  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX,
-- 
2.7.4



[PATCH 05/29] scsi: qla4xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 64c6fa5..41e1027 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -9793,7 +9793,7 @@ static const struct pci_error_handlers 
qla4xxx_err_handler = {
.resume = qla4xxx_pci_resume,
 };
 
-static struct pci_device_id qla4xxx_pci_tbl[] = {
+static const struct pci_device_id qla4xxx_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP4010,
-- 
2.7.4



[PATCH 08/29] scsi: ipr: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/ipr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index b0c68d2..edc7030 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -10644,7 +10644,7 @@ static void ipr_shutdown(struct pci_dev *pdev)
}
 }
 
-static struct pci_device_id ipr_pci_table[] = {
+static const struct pci_device_id ipr_pci_table[] = {
{ PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE,
PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_5702, 0, 0, 0 },
{ PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE,
-- 
2.7.4



[PATCH 06/29] scsi: mvsas: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/mvsas/mv_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 4e047b5..552c5a0 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -659,7 +659,7 @@ static void mvs_pci_remove(struct pci_dev *pdev)
return;
 }
 
-static struct pci_device_id mvs_pci_table[] = {
+static const struct pci_device_id mvs_pci_table[] = {
{ PCI_VDEVICE(MARVELL, 0x6320), chip_6320 },
{ PCI_VDEVICE(MARVELL, 0x6340), chip_6440 },
{
-- 
2.7.4



[PATCH 09/29] scsi: arcmsr: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index af032c4..392fb07 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -141,7 +141,7 @@ static struct scsi_host_template arcmsr_scsi_host_template 
= {
.no_write_same  = 1,
 };
 
-static struct pci_device_id arcmsr_device_id_table[] = {
+static const struct pci_device_id arcmsr_device_id_table[] = {
{PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1110),
.driver_data = ACB_ADAPTER_TYPE_A},
{PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1120),
-- 
2.7.4



[PATCH 10/29] scsi: dpt_i2o: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/scsi/dpt_i2o.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 256dd67..ba90cc4 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -181,7 +181,7 @@ static u8 adpt_read_blink_led(adpt_hba* host)
  */
 
 #ifdef MODULE
-static struct pci_device_id dptids[] = {
+static const struct pci_device_id dptids[] = {
{ PCI_DPT_VENDOR_ID, PCI_DPT_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
{ PCI_DPT_VENDOR_ID, PCI_DPT_RAPTOR_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
{ 0, }
-- 
2.7.4



[PATCH 00/29] constify scsi pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by  work with
const pci_device_id. So mark the non-const structs as const.

Arvind Yadav (29):
  [PATCH 01/29] scsi: qla1280: constify pci_device_id.
  [PATCH 02/29] scsi: qedi: constify pci_device_id.
  [PATCH 03/29] scsi: am53c974: constify pci_device_id.
  [PATCH 04/29] scsi: pm8001: constify pci_device_id.
  [PATCH 05/29] scsi: qla4xxx: constify pci_device_id.
  [PATCH 06/29] scsi: mvsas: constify pci_device_id.
  [PATCH 07/29] scsi: 3w-9xxx: constify pci_device_id.
  [PATCH 08/29] scsi: ipr: constify pci_device_id.
  [PATCH 09/29] scsi: arcmsr: constify pci_device_id.
  [PATCH 10/29] scsi: dpt_i2o: constify pci_device_id.
  [PATCH 11/29] scsi: 3w-sas: constify pci_device_id.
  [PATCH 12/29] scsi: hptiop: constify pci_device_id.
  [PATCH 13/29] scsi: fdomain: constify pci_device_id.
  [PATCH 14/29] scsi: snic: constify pci_device_id.
  [PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id.
  [PATCH 16/29] scsi: esas2r: constify pci_device_id.
  [PATCH 17/29] scsi: qla2xxx: constify pci_device_id.
  [PATCH 18/29] scsi: dmx3191d: constify pci_device_id.
  [PATCH 19/29] scsi: megaraid: constify pci_device_id.
  [PATCH 20/29] scsi: cxlflash: constify pci_device_id.
  [PATCH 21/29] scsi: nsp32: constify pci_device_id.
  [PATCH 22/29] scsi: pmcraid: constify pci_device_id.
  [PATCH 23/29] scsi: fnic: constify pci_device_id.
  [PATCH 24/29] scsi: stex: constify pci_device_id.
  [PATCH 25/29] scsi: megaraid: constify pci_device_id.
  [PATCH 26/29] scsi: a100u2w: constify pci_device_id.
  [PATCH 27/29] scsi: advansys: constify pci_device_id.
  [PATCH 28/29] scsi: atp870u: constify pci_device_id.
  [PATCH 29/29] scsi: 3w-: constify pci_device_id.

 drivers/scsi/3w-9xxx.c| 2 +-
 drivers/scsi/3w-sas.c | 2 +-
 drivers/scsi/3w-.c| 2 +-
 drivers/scsi/a100u2w.c| 2 +-
 drivers/scsi/advansys.c   | 2 +-
 drivers/scsi/am53c974.c   | 2 +-
 drivers/scsi/arcmsr/arcmsr_hba.c  | 2 +-
 drivers/scsi/atp870u.c| 2 +-
 drivers/scsi/cxlflash/main.c  | 2 +-
 drivers/scsi/dmx3191d.c   | 2 +-
 drivers/scsi/dpt_i2o.c| 2 +-
 drivers/scsi/esas2r/esas2r_main.c | 2 +-
 drivers/scsi/fdomain.c| 2 +-
 drivers/scsi/fnic/fnic_main.c | 2 +-
 drivers/scsi/hptiop.c | 2 +-
 drivers/scsi/ipr.c| 2 +-
 drivers/scsi/megaraid.c   | 2 +-
 drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
 drivers/scsi/mvsas/mv_init.c  | 2 +-
 drivers/scsi/nsp32.c  | 2 +-
 drivers/scsi/pm8001/pm8001_init.c | 2 +-
 drivers/scsi/pmcraid.c| 2 +-
 drivers/scsi/qedi/qedi_main.c | 2 +-
 drivers/scsi/qla1280.c| 2 +-
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 drivers/scsi/snic/snic_main.c | 2 +-
 drivers/scsi/stex.c   | 2 +-
 drivers/scsi/sym53c8xx_2/sym_glue.c   | 2 +-
 29 files changed, 29 insertions(+), 29 deletions(-)

-- 
2.7.4