Re: [PATCH v2] mptfusion: enable no_write_same for vmware scsi disks

From: Christoph Hellwig
Date: Tue Sep 23 2014 - 03:12:03 EST


Hi Chris,

thanks for updating it, althugh it would need a few more updates.

> + /* Fix for vmware guests that do not implement write_same
> + */
> + if (pdev->subsystem_vendor == 0x15AD) {
> + mptspi_driver_template.no_write_same = 1;
> + }
> +

We should set it only on th host that matches, not the whole template
for this case. The host is allocated just below your statement in
the same function, so this should be easy.

Also no need for braces here, and try to follow the Linux comment style:

/* The VMWare emulation doesn't properly impement WRITE SAME */
if (pdev->subsystem_vendor == 0x15AD)
sh->no_write_same = 1;


(and yes, it would be good to have PCI_VENDOR_ID_VMWARE in pci_ids.h,
but that shouldn't be done in this bug fix patch)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/