* [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy @ 2012-04-11 18:34 Greg KH 2012-04-11 19:57 ` Jens Axboe 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2012-04-11 18:34 UTC (permalink / raw) To: Sam Bradshaw, Asai Thambi S P, Jens Axboe; +Cc: linux-kernel This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it depend on PCI. Cc: Sam Bradshaw <sbradshaw@micron.com> Cc: Asai Thambi S P <asamymuthupa@micron.com> Cc: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- Note, the driver builds just fine without this dependency, and I have a system that does not have HOTPLUG PCIE, yet it has PCIE slots, which should be all that is required for this driver. What am I missing that required this dependency in the first place? diff --git a/drivers/block/mtip32xx/Kconfig b/drivers/block/mtip32xx/Kconfig index b5dd14e..0ba837f 100644 --- a/drivers/block/mtip32xx/Kconfig +++ b/drivers/block/mtip32xx/Kconfig @@ -4,6 +4,6 @@ config BLK_DEV_PCIESSD_MTIP32XX tristate "Block Device Driver for Micron PCIe SSDs" - depends on HOTPLUG_PCI_PCIE + depends on PCI help This enables the block driver for Micron PCIe SSDs. ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 18:34 [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy Greg KH @ 2012-04-11 19:57 ` Jens Axboe 2012-04-11 20:33 ` Asai Thambi S P 0 siblings, 1 reply; 11+ messages in thread From: Jens Axboe @ 2012-04-11 19:57 UTC (permalink / raw) To: Greg KH; +Cc: Sam Bradshaw, Asai Thambi S P, linux-kernel@vger.kernel.org On 2012-04-11 20:34, Greg KH wrote: > This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it > depend on PCI. I think it's an old dependency. I've built and run it here without as well, and no functional issues either. Sam/Asai? -- Jens Axboe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 19:57 ` Jens Axboe @ 2012-04-11 20:33 ` Asai Thambi S P 2012-04-11 20:38 ` Jens Axboe 2012-04-11 20:40 ` Greg KH 0 siblings, 2 replies; 11+ messages in thread From: Asai Thambi S P @ 2012-04-11 20:33 UTC (permalink / raw) To: Jens Axboe; +Cc: Greg KH, Sam Bradshaw, linux-kernel@vger.kernel.org On 4/11/2012 12:57 PM, Jens Axboe wrote: > On 2012-04-11 20:34, Greg KH wrote: >> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >> depend on PCI. > > I think it's an old dependency. I've built and run it here without as > well, and no functional issues either. > > Sam/Asai? > Both driver and device will work fine without PCIe hotplug dependency. This dependency is required for supporting surprise removal and surprise insertion of the device on systems with PCIe hotplug controller. -- Regards, Asai Thambi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 20:33 ` Asai Thambi S P @ 2012-04-11 20:38 ` Jens Axboe 2012-04-12 0:46 ` Asai Thambi S P 2012-04-11 20:40 ` Greg KH 1 sibling, 1 reply; 11+ messages in thread From: Jens Axboe @ 2012-04-11 20:38 UTC (permalink / raw) To: Asai Thambi S P; +Cc: Greg KH, Sam Bradshaw, linux-kernel@vger.kernel.org On 2012-04-11 22:33, Asai Thambi S P wrote: > On 4/11/2012 12:57 PM, Jens Axboe wrote: > >> On 2012-04-11 20:34, Greg KH wrote: >>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >>> depend on PCI. >> >> I think it's an old dependency. I've built and run it here without as >> well, and no functional issues either. >> >> Sam/Asai? >> > > > Both driver and device will work fine without PCIe hotplug dependency. This > dependency is required for supporting surprise removal and surprise insertion > of the device on systems with PCIe hotplug controller. That goes for all devices, though. So I think we can safely remove this dependency. Nobody should expect hotplug/removal to work, without actually including that :-) If you or Sam would formally ack the patch, then I'll add it to the pending mtip32xx series. -- Jens Axboe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 20:38 ` Jens Axboe @ 2012-04-12 0:46 ` Asai Thambi S P 2012-04-12 7:38 ` Jens Axboe 0 siblings, 1 reply; 11+ messages in thread From: Asai Thambi S P @ 2012-04-12 0:46 UTC (permalink / raw) To: Jens Axboe; +Cc: Greg KH, Sam Bradshaw, linux-kernel@vger.kernel.org On 4/11/2012 1:38 PM, Jens Axboe wrote: > On 2012-04-11 22:33, Asai Thambi S P wrote: >> On 4/11/2012 12:57 PM, Jens Axboe wrote: >> >>> On 2012-04-11 20:34, Greg KH wrote: >>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >>>> depend on PCI. >>> >>> I think it's an old dependency. I've built and run it here without as >>> well, and no functional issues either. >>> >>> Sam/Asai? >>> >> >> >> Both driver and device will work fine without PCIe hotplug dependency. This >> dependency is required for supporting surprise removal and surprise insertion >> of the device on systems with PCIe hotplug controller. > > That goes for all devices, though. So I think we can safely remove this > dependency. Nobody should expect hotplug/removal to work, without > actually including that :-) > > If you or Sam would formally ack the patch, then I'll add it to the > pending mtip32xx series. > Acked-by: Asai Thambi S P <asamymuthupa@micron.com> -- Regards, Asai Thambi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-12 0:46 ` Asai Thambi S P @ 2012-04-12 7:38 ` Jens Axboe 0 siblings, 0 replies; 11+ messages in thread From: Jens Axboe @ 2012-04-12 7:38 UTC (permalink / raw) To: Asai Thambi S P; +Cc: Greg KH, Sam Bradshaw, linux-kernel@vger.kernel.org On 04/12/2012 02:46 AM, Asai Thambi S P wrote: > On 4/11/2012 1:38 PM, Jens Axboe wrote: > >> On 2012-04-11 22:33, Asai Thambi S P wrote: >>> On 4/11/2012 12:57 PM, Jens Axboe wrote: >>> >>>> On 2012-04-11 20:34, Greg KH wrote: >>>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >>>>> depend on PCI. >>>> >>>> I think it's an old dependency. I've built and run it here without as >>>> well, and no functional issues either. >>>> >>>> Sam/Asai? >>>> >>> >>> >>> Both driver and device will work fine without PCIe hotplug dependency. This >>> dependency is required for supporting surprise removal and surprise insertion >>> of the device on systems with PCIe hotplug controller. >> >> That goes for all devices, though. So I think we can safely remove this >> dependency. Nobody should expect hotplug/removal to work, without >> actually including that :-) >> >> If you or Sam would formally ack the patch, then I'll add it to the >> pending mtip32xx series. >> > > Acked-by: Asai Thambi S P <asamymuthupa@micron.com> Thanks applied Gregs patch - I see the two of you battled it out while I was sound asleep ;-) -- Jens Axboe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 20:33 ` Asai Thambi S P 2012-04-11 20:38 ` Jens Axboe @ 2012-04-11 20:40 ` Greg KH 2012-04-11 22:22 ` Asai Thambi S P 1 sibling, 1 reply; 11+ messages in thread From: Greg KH @ 2012-04-11 20:40 UTC (permalink / raw) To: Asai Thambi S P; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel@vger.kernel.org On Wed, Apr 11, 2012 at 01:33:39PM -0700, Asai Thambi S P wrote: > On 4/11/2012 12:57 PM, Jens Axboe wrote: > > > On 2012-04-11 20:34, Greg KH wrote: > >> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it > >> depend on PCI. > > > > I think it's an old dependency. I've built and run it here without as > > well, and no functional issues either. > > > > Sam/Asai? > > > > > Both driver and device will work fine without PCIe hotplug dependency. This > dependency is required for supporting surprise removal and surprise insertion > of the device on systems with PCIe hotplug controller. But that's not a driver-specific thing at all. All PCI drivers need to be able to handle this (I like how you constantly check the pci id, that's cute.) So I think a basic dependancy on PCI should be fine here. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 20:40 ` Greg KH @ 2012-04-11 22:22 ` Asai Thambi S P 2012-04-11 22:37 ` Greg KH 0 siblings, 1 reply; 11+ messages in thread From: Asai Thambi S P @ 2012-04-11 22:22 UTC (permalink / raw) To: Greg KH; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel@vger.kernel.org On 4/11/2012 1:40 PM, Greg KH wrote: > On Wed, Apr 11, 2012 at 01:33:39PM -0700, Asai Thambi S P wrote: >> On 4/11/2012 12:57 PM, Jens Axboe wrote: >> >>> On 2012-04-11 20:34, Greg KH wrote: >>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >>>> depend on PCI. >>> >>> I think it's an old dependency. I've built and run it here without as >>> well, and no functional issues either. >>> >>> Sam/Asai? >>> >> >> >> Both driver and device will work fine without PCIe hotplug dependency. This >> dependency is required for supporting surprise removal and surprise insertion >> of the device on systems with PCIe hotplug controller. > > But that's not a driver-specific thing at all. All PCI drivers need to > be able to handle this (I like how you constantly check the pci id, > that's cute.) > > So I think a basic dependancy on PCI should be fine here. The P320 is different from existing PCIe devices supporting surprise removal and surprise insertion (SRSI) capability (aka hotplug). We equate the hotplug functionality enabled by PCIe hotplug controllers to that of any other storage endpoint (SAS, SATA, FC, etc). For those devices, hotplug functionality is enabled by the transport layer and propagated up to host storage stack for handling. There are two types of users for P320 device – 1) those with systems that have PCIe hotplug controllers and intend to use hotplug and 2) those who do not need or intend to use hotplug. The HOTPLUG_PCI_PCIE dependency enables users in the first bucket to use the device’s capability without affecting those in the second bucket. While there aren’t many systems today that have PCIe hotplug controllers, you will begin to see such systems very soon. The mtip32xx driver depends on remove() being called for graceful handling of surprise removal events. Such cleanup is necessary to enable clean surprise insertion of the same/different device in the same slot. We do check the PCI id in non-fast path code to detect the surprise removal and fail any outstanding I/Os with -ENODEV, but the driver still depends on the pci core with help from the pcie hotplug module to call remove() for cleanup, hence the HOTPLUG_PCI_PCIE dependency. -- Regards, Asai Thambi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 22:22 ` Asai Thambi S P @ 2012-04-11 22:37 ` Greg KH 2012-04-12 0:32 ` Asai Thambi S P 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2012-04-11 22:37 UTC (permalink / raw) To: Asai Thambi S P; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel@vger.kernel.org On Wed, Apr 11, 2012 at 03:22:56PM -0700, Asai Thambi S P wrote: > On 4/11/2012 1:40 PM, Greg KH wrote: > > > On Wed, Apr 11, 2012 at 01:33:39PM -0700, Asai Thambi S P wrote: > >> On 4/11/2012 12:57 PM, Jens Axboe wrote: > >> > >>> On 2012-04-11 20:34, Greg KH wrote: > >>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it > >>>> depend on PCI. > >>> > >>> I think it's an old dependency. I've built and run it here without as > >>> well, and no functional issues either. > >>> > >>> Sam/Asai? > >>> > >> > >> > >> Both driver and device will work fine without PCIe hotplug dependency. This > >> dependency is required for supporting surprise removal and surprise insertion > >> of the device on systems with PCIe hotplug controller. > > > > But that's not a driver-specific thing at all. All PCI drivers need to > > be able to handle this (I like how you constantly check the pci id, > > that's cute.) > > > > So I think a basic dependancy on PCI should be fine here. > > The P320 is different from existing PCIe devices supporting surprise removal > and surprise insertion (SRSI) capability (aka hotplug). We equate the hotplug > functionality enabled by PCIe hotplug controllers to that of any other storage > endpoint (SAS, SATA, FC, etc). For those devices, hotplug functionality is > enabled by the transport layer and propagated up to host storage stack for > handling. Huh? No, hotplug on Linux happens on the PCI level, and has done so for over 10 years. > There are two types of users for P320 device – 1) those with systems that have > PCIe hotplug controllers and intend to use hotplug and 2) those who do not > need or intend to use hotplug. The HOTPLUG_PCI_PCIE dependency enables users > in the first bucket to use the device’s capability without affecting those in > the second bucket. No, it prevents the users in the second group from ever using this driver as it will not be built at all. I have such a system right here, and I want to use the device, yet could not as I do not have HOTPLUG_PCI_PCIE enabled in my kernel because I do not have that type of PCI Hotplug controller. > While there aren’t many systems today that have PCIe > hotplug controllers, you will begin to see such systems very soon. Manufacturers have been telling me that for over 10 years ago, when I got the first PCI Hotplug driver merged into the kernel tree :) > The mtip32xx driver depends on remove() being called for graceful handling of > surprise removal events. As it should, nothing new there, that's how PCI hotplug works. > Such cleanup is necessary to enable clean surprise > insertion of the same/different device in the same slot. We do check the PCI > id in non-fast path code to detect the surprise removal and fail any > outstanding I/Os with -ENODEV, but the driver still depends on the pci core > with help from the pcie hotplug module to call remove() for cleanup, hence the > HOTPLUG_PCI_PCIE dependency. No, that's not a valid dependency at all, sorry. All you should depend on is CONFIG_PCI and CONFIG_BLOCK. Your driver doesn't know, or care, if the system is a PCI hotplug one, as that is how we architected the PCI hotplug layer. Otherwise all PCI drivers would have to have this type of logic in it, and that would be a lot of extra work for no good reason. So, I still think this dependency should be removed, the fact that I'm typing this from a system running on this card at the moment, without PCIE hotplug capabilities, kind of proves it :) thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-11 22:37 ` Greg KH @ 2012-04-12 0:32 ` Asai Thambi S P 2012-04-12 0:36 ` Greg KH 0 siblings, 1 reply; 11+ messages in thread From: Asai Thambi S P @ 2012-04-12 0:32 UTC (permalink / raw) To: Greg KH; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel@vger.kernel.org On 4/11/2012 3:37 PM, Greg KH wrote: > On Wed, Apr 11, 2012 at 03:22:56PM -0700, Asai Thambi S P wrote: >> On 4/11/2012 1:40 PM, Greg KH wrote: >> >>> On Wed, Apr 11, 2012 at 01:33:39PM -0700, Asai Thambi S P wrote: >>>> On 4/11/2012 12:57 PM, Jens Axboe wrote: >>>> >>>>> On 2012-04-11 20:34, Greg KH wrote: >>>>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it >>>>>> depend on PCI. >>>>> >>>>> I think it's an old dependency. I've built and run it here without as >>>>> well, and no functional issues either. >>>>> >>>>> Sam/Asai? >>>>> >>>> >>>> >>>> Both driver and device will work fine without PCIe hotplug dependency. This >>>> dependency is required for supporting surprise removal and surprise insertion >>>> of the device on systems with PCIe hotplug controller. >>> >>> But that's not a driver-specific thing at all. All PCI drivers need to >>> be able to handle this (I like how you constantly check the pci id, >>> that's cute.) >>> >>> So I think a basic dependancy on PCI should be fine here. >> >> The P320 is different from existing PCIe devices supporting surprise removal >> and surprise insertion (SRSI) capability (aka hotplug). We equate the hotplug >> functionality enabled by PCIe hotplug controllers to that of any other storage >> endpoint (SAS, SATA, FC, etc). For those devices, hotplug functionality is >> enabled by the transport layer and propagated up to host storage stack for >> handling. > > Huh? No, hotplug on Linux happens on the PCI level, and has done so for > over 10 years. Just to clarify, I was referring to hotplug of SAS/SATA/FC storage devices, not HBA. > >> There are two types of users for P320 device – 1) those with systems that have >> PCIe hotplug controllers and intend to use hotplug and 2) those who do not >> need or intend to use hotplug. The HOTPLUG_PCI_PCIE dependency enables users >> in the first bucket to use the device’s capability without affecting those in >> the second bucket. > > No, it prevents the users in the second group from ever using this > driver as it will not be built at all. > > I have such a system right here, and I want to use the device, yet could > not as I do not have HOTPLUG_PCI_PCIE enabled in my kernel because I do > not have that type of PCI Hotplug controller. > >> While there aren’t many systems today that have PCIe >> hotplug controllers, you will begin to see such systems very soon. > > Manufacturers have been telling me that for over 10 years ago, when I > got the first PCI Hotplug driver merged into the kernel tree :) > >> The mtip32xx driver depends on remove() being called for graceful handling of >> surprise removal events. > > As it should, nothing new there, that's how PCI hotplug works. > >> Such cleanup is necessary to enable clean surprise >> insertion of the same/different device in the same slot. We do check the PCI >> id in non-fast path code to detect the surprise removal and fail any >> outstanding I/Os with -ENODEV, but the driver still depends on the pci core >> with help from the pcie hotplug module to call remove() for cleanup, hence the >> HOTPLUG_PCI_PCIE dependency. > > No, that's not a valid dependency at all, sorry. > > All you should depend on is CONFIG_PCI and CONFIG_BLOCK. Your driver > doesn't know, or care, if the system is a PCI hotplug one, as that is > how we architected the PCI hotplug layer. Otherwise all PCI drivers > would have to have this type of logic in it, and that would be a lot of > extra work for no good reason. > > So, I still think this dependency should be removed, the fact that I'm > typing this from a system running on this card at the moment, without > PCIE hotplug capabilities, kind of proves it :) Agree to remove the dependency. I will reply to Jens email too. -- Regards, Asai Thambi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy 2012-04-12 0:32 ` Asai Thambi S P @ 2012-04-12 0:36 ` Greg KH 0 siblings, 0 replies; 11+ messages in thread From: Greg KH @ 2012-04-12 0:36 UTC (permalink / raw) To: Asai Thambi S P; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel@vger.kernel.org On Wed, Apr 11, 2012 at 05:32:15PM -0700, Asai Thambi S P wrote: > On 4/11/2012 3:37 PM, Greg KH wrote: > > > On Wed, Apr 11, 2012 at 03:22:56PM -0700, Asai Thambi S P wrote: > >> On 4/11/2012 1:40 PM, Greg KH wrote: > >> > >>> On Wed, Apr 11, 2012 at 01:33:39PM -0700, Asai Thambi S P wrote: > >>>> On 4/11/2012 12:57 PM, Jens Axboe wrote: > >>>> > >>>>> On 2012-04-11 20:34, Greg KH wrote: > >>>>>> This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it > >>>>>> depend on PCI. > >>>>> > >>>>> I think it's an old dependency. I've built and run it here without as > >>>>> well, and no functional issues either. > >>>>> > >>>>> Sam/Asai? > >>>>> > >>>> > >>>> > >>>> Both driver and device will work fine without PCIe hotplug dependency. This > >>>> dependency is required for supporting surprise removal and surprise insertion > >>>> of the device on systems with PCIe hotplug controller. > >>> > >>> But that's not a driver-specific thing at all. All PCI drivers need to > >>> be able to handle this (I like how you constantly check the pci id, > >>> that's cute.) > >>> > >>> So I think a basic dependancy on PCI should be fine here. > >> > >> The P320 is different from existing PCIe devices supporting surprise removal > >> and surprise insertion (SRSI) capability (aka hotplug). We equate the hotplug > >> functionality enabled by PCIe hotplug controllers to that of any other storage > >> endpoint (SAS, SATA, FC, etc). For those devices, hotplug functionality is > >> enabled by the transport layer and propagated up to host storage stack for > >> handling. > > > > Huh? No, hotplug on Linux happens on the PCI level, and has done so for > > over 10 years. > > Just to clarify, I was referring to hotplug of SAS/SATA/FC storage devices, > not HBA. Ah, ok, yes, you are right, but as you aren't using the SCSI layer here (odd, but ok), you can only handle hotplug at the PCI layer. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-04-12 7:39 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-04-11 18:34 [PATCH] block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy Greg KH 2012-04-11 19:57 ` Jens Axboe 2012-04-11 20:33 ` Asai Thambi S P 2012-04-11 20:38 ` Jens Axboe 2012-04-12 0:46 ` Asai Thambi S P 2012-04-12 7:38 ` Jens Axboe 2012-04-11 20:40 ` Greg KH 2012-04-11 22:22 ` Asai Thambi S P 2012-04-11 22:37 ` Greg KH 2012-04-12 0:32 ` Asai Thambi S P 2012-04-12 0:36 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox