Re: Patch "ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files" has been added to the 4.9-stable tree

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

 



On Tue, Jun 14, 2022 at 05:57:24PM +0900, Damien Le Moal wrote:
> On 6/14/22 17:37, Sergey Shtylyov wrote:
> > Hello!
> > 
> > On 6/13/22 11:06 PM, Greg KH wrote:
> > 
> >>> [...]
> >>>>>> This is a note to let you know that I've just added the patch titled
> >>>>>>
> >>>>>>     ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
> >>>>>>
> >>>>>> to the 4.9-stable tree which can be found at:
> >>>>>>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >>>>>>
> >>>>>> The filename of the patch is:
> >>>>>>      ata-libata-transport-fix-dma-pio-xfer-_mode-sysfs-files.patch
> >>>>>> and it can be found in the queue-4.9 subdirectory.
> >>>>>>
> >>>>>> If you, or anyone else, feels it should not be added to the stable tree,
> >>>>>> please let <stable@xxxxxxxxxxxxxxx> know about it.
> >>>>>>
> >>>>>>
> >>>>>> From 72aad489f992871e908ff6d9055b26c6366fb864 Mon Sep 17 00:00:00 2001
> >>>>>> From: Sergey Shtylyov <s.shtylyov@xxxxxx>
> >>>>>> Date: Wed, 8 Jun 2022 22:51:07 +0300
> >>>>>> Subject: ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
> >>>>>>
> >>>>>> From: Sergey Shtylyov <s.shtylyov@xxxxxx>
> >>>>>>
> >>>>>> commit 72aad489f992871e908ff6d9055b26c6366fb864 upstream.
> >>>>>>
> >>>>>> The {dma|pio}_mode sysfs files are incorrectly documented as having a
> >>>>>> list of the supported DMA/PIO transfer modes, while the corresponding
> >>>>>> fields of the *struct* ata_device hold the transfer mode IDs, not masks.
> >>>>>>
> >>>>>> To match these docs, the {dma|pio}_mode (and even xfer_mode!) sysfs
> >>>>>> files are handled by the ata_bitfield_name_match() macro which leads to
> >>>>>> reading such kind of nonsense from them:
> >>>>>>
> >>>>>> $ cat /sys/class/ata_device/dev3.0/pio_mode
> >>>>>> XFER_UDMA_7, XFER_UDMA_6, XFER_UDMA_5, XFER_UDMA_4, XFER_MW_DMA_4,
> >>>>>> XFER_PIO_6, XFER_PIO_5, XFER_PIO_4, XFER_PIO_3, XFER_PIO_2, XFER_PIO_1,
> >>>>>> XFER_PIO_0
> >>>>>>
> >>>>>> Using the correct ata_bitfield_name_search() macro fixes that:
> >>>>>>
> >>>>>> $ cat /sys/class/ata_device/dev3.0/pio_mode
> >>>>>> XFER_PIO_4
> >>>>>>
> >>>>>> While fixing the file documentation, somewhat reword the {dma|pio}_mode
> >>>>>> file doc and add a note about being mostly useful for PATA devices to
> >>>>>> the xfer_mode file doc...
> >>>>>>
> >>>>>> Fixes: d9027470b886 ("[libata] Add ATA transport class")
> >>>>>> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
> >>>>>> Cc: stable@xxxxxxxxxxxxxxx
> >>>>>> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
> >>>>>> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> >>>>>> ---
> >>>>>>  Documentation/ABI/testing/sysfs-ata |    5 +++--
> >>>>>>  drivers/ata/libata-transport.c      |    2 +-
> >>>>>>  2 files changed, 4 insertions(+), 3 deletions(-)
> >>>>>>
> >>>>>> --- a/Documentation/ABI/testing/sysfs-ata
> >>>>>> +++ b/Documentation/ABI/testing/sysfs-ata
> >>>>>> @@ -59,17 +59,18 @@ class
> >>>>>>  
> >>>>>>  dma_mode
> >>>>>>  
> >>>>>> -	Transfer modes supported by the device when in DMA mode.
> >>>>>> +	DMA transfer mode used by the device.
> >>>>>>  	Mostly used by PATA device.
> >>>>>
> >>>>>    You forgot to do s/devce/devices/.
> >>>>
> >>>> Arg, Yes.
> >>>
> >>>    So it was you who ported to 4.4/4.14? :-)
> >>
> >> No, that was me doing it by hand, my fault, so I'll just leave it for
> >> now.
> > 
> >    Leave? What do you mean? Do I need to send my backported version?
> 
> Sergey,
> 
> Please send a patch fixing the typos with a fixes tag. I will apply it and
> that will then go to stable too fixing everything.
> 
> Greg,
> 
> Is that OK with you ?

For something this trivial, on very old stable branches, I doubt it is
worth the effort.

thanks,

greg k-h



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux