Re: [PATCH v2 0/3] scsi: ufs & ums-*: fix module reference counting

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

 



On Thu, 8 Jan 2015, Akinobu Mita wrote:

> >> Why don't ufs and usb-storage define the host templates in the sub drivers?
> >> That's what libata or the mpt fusion driver do.
> >
> > Originally the subdrivers were all part of usb-storage.  When they were
> > split out into separate modules, there didn't seem to be any need to
> > copy the host template into each one.  (Especially since some of the
> > method pointers in the host template refer to routines in usb-storage
> > itself, not in the subdrivers.)  The fact that the .module member was
> > no longer adequate escaped our notice at the time.
> 
> For ufs, the reason why a host template is shared by sub drivers is similar
> to usb-storage.  Originally there was only a single pci driver for ufs.
> When platform driver for ufs was introduced, it was split into core driver
> (ufshcd) and sub drivers (ufshcd-pci and ufshcd-pltfrm).  They require
> exactly the same host template.
> 
> Is there any other preferable way to fix this problem?  The first time I
> found this in ufs driver, I was trying to fix it by merging core and sub
> drivers into a single compound module.  But I realized that usm-* drivers
> have the same problem, then I decided to propose what this patch series do
> instead.

I can't think of any other ways to fix it.  The only options seem to be
to duplicate the host template in each subdriver or to add the .module
field to the host structure.  I prefer the second option because it
doesn't involve so much code duplication.

Alan Stern

--
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