Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 8, 2015, at 5:05 AM, Michael Neuling wrote:
> 
> Reviewed-by: Michael Neuling <mikey@xxxxxxxxxxx>

Thanks again for helping us to review the code.

> 
> The core cxl changes needed for this are in mpe's powerpc next branch queued up
> for 4.2.  They are in linux next-20150605.  To compile this you'll need to pull
> in mpe's powerpc tree from:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux.git next

I went ahead and did a test build against this tree, everything worked.

>> +config CXLFLASH
>> +	tristate "Support for IBM CAPI Flash"
>> +	depends on CXL
> 
> This should be depends on SCSI too?

Yep, and PCI. Will fix in v5.

> 
>> +struct afu {
> < snip>
>> +	u64 interface_version;
> 
> This doesn't seem to be used anywhere except for in init_afu where it's
> only used local to that function.

True, the intention here is to save it off in case it is needed in a debug scenario. We may
even make it retrievable via a sysfs attribute at some point. 

>> +
>> +static inline u64 lun_to_lunid(u64 lun)
>> +{
>> +	u64 lun_id;
>> +
>> +	int_to_scsilun(lun, (struct scsi_lun *)&lun_id);
>> +	return swab64(lun_id);
>> +}
> 
> This is only used in main.c.  Why is it not just in there?

We use it in other places within the driver that have not been submitted. Rather than
migrating it around we decided to keep it defined in the common header.

> 
>> +/**
>> + * cxlflash_probe() - PCI entry point to add host
>> + * @pdev:	PCI device associated with the host.
>> + * @dev_id:	PCI device id associated with device.
>> + *
>> + * Return: 0 on success / non-zero on failure
>> + */
>> +static int cxlflash_probe(struct pci_dev *pdev,
>> +			  const struct pci_device_id *dev_id)
>> +{
> <snip>
>> +	phys_dev = cxl_get_phys_dev(pdev);
>> +	if (!dev_is_pci(phys_dev)) {
>> +		pr_err("%s: not a pci dev\n", __func__);
>> +		rc = ENODEV;
> 
> -ENODEV;

Good catch! Will fix in v5.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux