mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] mvsas: Generalize Marvell 9485 in pci_device_id
@ 2016-04-07 17:06 Leonid Moiseichuk
  2016-04-07 18:36 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Leonid Moiseichuk @ 2016-04-07 17:06 UTC (permalink / raw)
  To: jejb, yuxiangl
  Cc: Wilfried.Weissmann, dan.j.williams, linux-scsi, linux-kernel,
	Leonid Moiseichuk

For generic subvendor has sense to use generic subdevice.
If subdevice ID not equal to 0x9480/0x9485 mvsas will be not activated.

Tested on ASUS P9A-I/C2550/SAS/4L which uses vendor-specific 1043:8635.

Signed-off-by: Leonid Moiseichuk <leonid.moiseichuk@gmail.com>
---
 drivers/scsi/mvsas/mv_init.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index c7c250519c4b..a6a4f09df0be 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -704,24 +704,7 @@ static struct pci_device_id mvs_pci_table[] = {
 		.class_mask	= 0,
 		.driver_data	= chip_9445,
 	},
-	{
-		.vendor		= PCI_VENDOR_ID_MARVELL_EXT,
-		.device		= 0x9485,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= 0x9480,
-		.class		= 0,
-		.class_mask	= 0,
-		.driver_data	= chip_9485,
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_MARVELL_EXT,
-		.device		= 0x9485,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= 0x9485,
-		.class		= 0,
-		.class_mask	= 0,
-		.driver_data	= chip_9485,
-	},
+	{ PCI_VDEVICE(MARVELL_EXT, 0x9485), chip_9485 },
 	{ PCI_VDEVICE(OCZ, 0x1021), chip_9485}, /* OCZ RevoDrive3 */
 	{ PCI_VDEVICE(OCZ, 0x1022), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */
 	{ PCI_VDEVICE(OCZ, 0x1040), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */
-- 
2.8.0.rc3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mvsas: Generalize Marvell 9485 in pci_device_id
  2016-04-07 17:06 [PATCH v2] mvsas: Generalize Marvell 9485 in pci_device_id Leonid Moiseichuk
@ 2016-04-07 18:36 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2016-04-07 18:36 UTC (permalink / raw)
  To: Leonid Moiseichuk
  Cc: jejb, yuxiangl, Wilfried.Weissmann, Dan Williams, linux-scsi,
	linux-kernel

On Thu, Apr 7, 2016 at 8:06 PM, Leonid Moiseichuk
<leonid.moiseichuk@gmail.com> wrote:
> For generic subvendor has sense to use generic subdevice.
> If subdevice ID not equal to 0x9480/0x9485 mvsas will be not activated.
>
> Tested on ASUS P9A-I/C2550/SAS/4L which uses vendor-specific 1043:8635.

Minors below.

FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

>
> Signed-off-by: Leonid Moiseichuk <leonid.moiseichuk@gmail.com>
> ---

Missed changelog vfrom v1 to v2.

>  drivers/scsi/mvsas/mv_init.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
> index c7c250519c4b..a6a4f09df0be 100644
> --- a/drivers/scsi/mvsas/mv_init.c
> +++ b/drivers/scsi/mvsas/mv_init.c
> @@ -704,24 +704,7 @@ static struct pci_device_id mvs_pci_table[] = {
>                 .class_mask     = 0,
>                 .driver_data    = chip_9445,
>         },
> -       {
> -               .vendor         = PCI_VENDOR_ID_MARVELL_EXT,
> -               .device         = 0x9485,
> -               .subvendor      = PCI_ANY_ID,
> -               .subdevice      = 0x9480,
> -               .class          = 0,
> -               .class_mask     = 0,
> -               .driver_data    = chip_9485,
> -       },
> -       {
> -               .vendor         = PCI_VENDOR_ID_MARVELL_EXT,
> -               .device         = 0x9485,
> -               .subvendor      = PCI_ANY_ID,
> -               .subdevice      = 0x9485,
> -               .class          = 0,
> -               .class_mask     = 0,
> -               .driver_data    = chip_9485,
> -       },
> +       { PCI_VDEVICE(MARVELL_EXT, 0x9485), chip_9485 },

+ commentary line?

... /* MARVELL bla-bla-bla */

>         { PCI_VDEVICE(OCZ, 0x1021), chip_9485}, /* OCZ RevoDrive3 */
>         { PCI_VDEVICE(OCZ, 0x1022), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */
>         { PCI_VDEVICE(OCZ, 0x1040), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */
> --
> 2.8.0.rc3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-07 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07 17:06 [PATCH v2] mvsas: Generalize Marvell 9485 in pci_device_id Leonid Moiseichuk
2016-04-07 18:36 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®