2002-06-20 09:46:54

by David Howells

[permalink] [raw]
Subject: IDE booting problems with 2.5.23

#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
CONFIG_ISA=y
# CONFIG_SBUS is not set
CONFIG_UID16=y

#
# Code maturity level options
#
# CONFIG_EXPERIMENTAL is not set

#
# General setup
#
CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MELAN is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_SMP=y
# CONFIG_PREEMPT is not set
# CONFIG_MULTIQUAD is not set
CONFIG_X86_MCE=y
# CONFIG_X86_MCE_NONFATAL is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
# CONFIG_MTRR is not set
CONFIG_HAVE_DEC_LOCK=y

#
# Power management options (ACPI, APM)
#

#
# ACPI Support
#
# CONFIG_ACPI is not set
# CONFIG_PM is not set
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_X86_IO_APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats
#
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_CML1=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_AMIGA is not set
# CONFIG_PARPORT_MFC3 is not set
# CONFIG_PARPORT_ATARI is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_SUNBPP is not set
# CONFIG_PARPORT_OTHER is not set
# CONFIG_PARPORT_1284 is not set

#
# Plug and Play configuration
#
# CONFIG_PNP is not set

#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_BLK_DEV_LOOP=m
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_VLAN_8021Q is not set

#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set

#
# Appletalk devices
#
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y

#
# ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set

#
# ATA host chip set support
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set

#
# PCI host chip set support
#
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_IDE_TCQ_DEPTH=32
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_IVB is not set
CONFIG_ATAPI=y
CONFIG_IDEDMA_AUTO=y

#
# SCSI support
#
# CONFIG_SCSI is not set

#
# Fusion MPT device support
#

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Network device support
#
CONFIG_NETDEVICES=y

#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
CONFIG_NET_VENDOR_3COM=y
# CONFIG_EL1 is not set
# CONFIG_EL2 is not set
# CONFIG_ELPLUS is not set
# CONFIG_EL3 is not set
# CONFIG_3C515 is not set
CONFIG_VORTEX=y
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
# CONFIG_FDDI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set

#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set

#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set

#
# ISDN subsystem
#
# CONFIG_ISDN_BOOL is not set

#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set

#
# Input device support
#
# CONFIG_INPUT is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_SERIO is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_PRINTER is not set
# CONFIG_PPDEV is not set

#
# I2C support
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ALGOPCF is not set
# CONFIG_I2C_CHARDEV is not set
# CONFIG_I2C_PROC is not set

#
# Mice
#
# CONFIG_BUSMOUSE is not set
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y
# CONFIG_REISERFS_FS is not set
CONFIG_EXT3_FS=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
# CONFIG_CRAMFS is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_JFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_ZISOFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_SMB_NLS is not set
CONFIG_NLS=y

#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VIDEO_SELECT is not set

#
# Sound
#
# CONFIG_SOUND is not set

#
# USB support
#
# CONFIG_USB is not set

#
# Bluetooth support
#
# CONFIG_BLUEZ is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SLAB=y
# CONFIG_DEBUG_IOVIRT is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_SPINLOCK=y

#
# Library routines
#
# CONFIG_CRC32 is not set
# CONFIG_ZLIB_INFLATE is not set
# CONFIG_ZLIB_DEFLATE is not set


2002-06-20 09:56:17

by Martin Dalecki

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23

U?ytkownik David Howells napisa?:
> Hi Martin,
>
> I'm having problems booting a 2.5.23 kernel on my test box (SMP). It hangs on
> trying to recalibrate the IDE interface. I've attached the output captured
> from the serial console. I've also attached the config file.
>
> Note that trying the following doesn't help:
>
> (*) Turning on and off "Use PCI DMA by default when available".
> (*) Specifying "hda=dma" on the kernel command line
> (*) Specifying "hda=935,128,63" on the kernel command line
>
> Can you suggest a fix please?

Well... IDE 92 falls in to the "brown paper bag" cathegory.
Even the supposedly better error recovery code
there is wrong, since it can schedule from IRQ context.
So please reverse apply it. It should help.

I have a theory that I schould in no case write code above
25 deg Celsius and this is just confirming it... :-).

Sorry for the inconvenience, but I thry now to slow a bit
down on the amount of changes and to focus on stabilizing again.

BTW> Jens did you notice that the IDE_DMA flag is a "read only"
flag? I see basically only TQC code checking it. I would
like to replace the drive->waiting_for_dma flag field by the
proper usage of the IDE_DMA bit. Any way this could bite TCQ code?
The checks there appear to be only sanity checks anyway.

2002-06-20 10:35:43

by Jens Axboe

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23

On Thu, Jun 20 2002, Martin Dalecki wrote:
> BTW> Jens did you notice that the IDE_DMA flag is a "read only"
> flag? I see basically only TQC code checking it. I would
> like to replace the drive->waiting_for_dma flag field by the
> proper usage of the IDE_DMA bit. Any way this could bite TCQ code?
> The checks there appear to be only sanity checks anyway.

At first I did just add them as sanity checks, but later on I had the
same thought myself (get rid of drive->waiting_for_dma). So go ahead
with that.

BTW, I see you renamed the flags to channel->active. I think that's a
bit misleading, can't you just call it ->state or ->flags (or
->state_flags? :-)

--
Jens Axboe

2002-06-20 10:51:28

by David Howells

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23


> Well... IDE 92 falls in to the "brown paper bag" cathegory.
> Even the supposedly better error recovery code
> there is wrong, since it can schedule from IRQ context.
> So please reverse apply it. It should help.

Yes, that works now.

Thanks,
David

2002-06-20 10:58:29

by Martin Dalecki

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23

U?ytkownik Jens Axboe napisa?:
> On Thu, Jun 20 2002, Martin Dalecki wrote:
>
>>BTW> Jens did you notice that the IDE_DMA flag is a "read only"
>>flag? I see basically only TQC code checking it. I would
>>like to replace the drive->waiting_for_dma flag field by the
>>proper usage of the IDE_DMA bit. Any way this could bite TCQ code?
>>The checks there appear to be only sanity checks anyway.
>
>
> At first I did just add them as sanity checks, but later on I had the
> same thought myself (get rid of drive->waiting_for_dma). So go ahead
> with that.

OK.

> BTW, I see you renamed the flags to channel->active. I think that's a
> bit misleading, can't you just call it ->state or ->flags (or
> ->state_flags? :-)

My reasoning behind this is - state is for device state
register and active is well for the state of the driver. All the other
names seemed for me to be too opaque for the purpose of it or already used.
flags souns static to me.
And you have to agree that it is *very* special
purpose if you look at the IDE_BUSY bit.
And finally - I took this name from the FreeBSD
code to make it look a bit more similar.

Another tought:

- We will have then an IDE_DMA which will indicate clearly
that we are expecting some async event for the sake of DMA.

But we have IDE_BUSY overloaded with both:

- Flagging that we are expecting an IRQ to arrive during
PIO io (in conjencture with ->handler != NULL).

- Flagging that the do_request code path should be reentered
immediately or is busy.

I thihink its hard but worth it to split the semantic overload.
In esp. a very fragile change. But I *feel* like it would
be worth it. Suggestions opinnions?

2002-06-20 11:05:30

by Jens Axboe

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23

On Thu, Jun 20 2002, Martin Dalecki wrote:
> >BTW, I see you renamed the flags to channel->active. I think that's a
> >bit misleading, can't you just call it ->state or ->flags (or
> >->state_flags? :-)
>
> My reasoning behind this is - state is for device state
> register and active is well for the state of the driver. All the other
> names seemed for me to be too opaque for the purpose of it or already used.
> flags souns static to me.
> And you have to agree that it is *very* special
> purpose if you look at the IDE_BUSY bit.
> And finally - I took this name from the FreeBSD
> code to make it look a bit more similar.

How about busy_flags or busy_state, then? Active sounds like a bool to
me, and frankly what FreeBSD uses really has no bearing on what we
should choose :-)

> Another tought:
>
> - We will have then an IDE_DMA which will indicate clearly
> that we are expecting some async event for the sake of DMA.

Right

> But we have IDE_BUSY overloaded with both:
>
> - Flagging that we are expecting an IRQ to arrive during
> PIO io (in conjencture with ->handler != NULL).
>
> - Flagging that the do_request code path should be reentered
> immediately or is busy.
>
> I thihink its hard but worth it to split the semantic overload.
> In esp. a very fragile change. But I *feel* like it would
> be worth it. Suggestions opinnions?

Keep IDE_BUSY as saying 'we are busy handling an event', ie expecting an
interrupt at some point. This is what is serializing access to the
channel, not the spin lock btw. Only one 'user' can flag the channel as
busy and then proceed to setup a command etc.

I dunno about your #2, that sounds a bit confusing.

--
Jens Axboe

2002-06-20 11:22:23

by Martin Dalecki

[permalink] [raw]
Subject: Re: IDE booting problems with 2.5.23

U?ytkownik Jens Axboe napisa?:
> On Thu, Jun 20 2002, Martin Dalecki wrote:
>
>>>BTW, I see you renamed the flags to channel->active. I think that's a
>>>bit misleading, can't you just call it ->state or ->flags (or
>>>->state_flags? :-)
>>
>>My reasoning behind this is - state is for device state
>>register and active is well for the state of the driver. All the other
>>names seemed for me to be too opaque for the purpose of it or already used.
>>flags souns static to me.
>>And you have to agree that it is *very* special
>>purpose if you look at the IDE_BUSY bit.
>>And finally - I took this name from the FreeBSD
>>code to make it look a bit more similar.
>
>
> How about busy_flags or busy_state, then? Active sounds like a bool to
> me, and frankly what FreeBSD uses really has no bearing on what we
> should choose :-)
>
>
>>Another tought:
>>
>>- We will have then an IDE_DMA which will indicate clearly
>>that we are expecting some async event for the sake of DMA.
>
>
> Right
>
>
>>But we have IDE_BUSY overloaded with both:
>>
>>- Flagging that we are expecting an IRQ to arrive during
>> PIO io (in conjencture with ->handler != NULL).
>>
>>- Flagging that the do_request code path should be reentered
>> immediately or is busy.
>>
>>I thihink its hard but worth it to split the semantic overload.
>>In esp. a very fragile change. But I *feel* like it would
>>be worth it. Suggestions opinnions?
>
>
> Keep IDE_BUSY as saying 'we are busy handling an event', ie expecting an
> interrupt at some point. This is what is serializing access to the
> channel, not the spin lock btw. Only one 'user' can flag the channel as
> busy and then proceed to setup a command etc.
>
> I dunno about your #2, that sounds a bit confusing.

I try to clarify a bit. After looking closer at the code I noticed
that IDE_BUSY is not just idicating that we should not
reenter the request handling. It is used to indicate that
we should reenter the request handling immediately after return
and it is used to indicate that a PIO transfer is in progress.
What I think about is to invent IDE_PIO as a first cut, which
would serve the same purpose as IDE_DMA for PIO transfers.
In esp. indicating that there is PIO IO in progress waiting for
an IRQ to happen. Stalling the request queue reentry should
be a different sotry then this I think. Hope this makes it more
clear.

>