[PATCH] libata-core: fix kernel-doc warning

2008-02-22 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Fix libata-core kernel-doc warning:
Warning(linux-2.6.25-rc2-git6//drivers/ata/libata-core.c:168): No description 
found for parameter 'ap'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.25-rc2-git6.orig/drivers/ata/libata-core.c
+++ linux-2.6.25-rc2-git6/drivers/ata/libata-core.c
@@ -153,7 +153,7 @@ MODULE_VERSION(DRV_VERSION);
 
 /**
  * ata_force_cbl - force cable type according to libata.force
- * @link: ATA link of interest
+ * @ap: ATA port of interest
  *
  * Force cable type according to libata.force and whine about it.
  * The last entry which has matching port number is used, so it
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] libata: fix kernel-doc parameter warning

2008-02-19 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Fix libata kernel-doc parameter:

Warning(linux-2.6.25-rc2-git3//drivers/ata/libata-scsi.c:845): No description 
found for parameter 'rq'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/libata-scsi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.25-rc2-git3.orig/drivers/ata/libata-scsi.c
+++ linux-2.6.25-rc2-git3/drivers/ata/libata-scsi.c
@@ -828,7 +828,7 @@ static void ata_scsi_sdev_config(struct 
 
 /**
  * atapi_drain_needed - Check whether data transfer may overflow
- * @request: request to be checked
+ * @rq: request to be checked
  *
  * ATAPI commands which transfer variable length data to host
  * might overflow due to application error or hardare bug.  This
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHSET] printk: implement printk_header() and merging printk

2008-01-15 Thread Randy Dunlap
On Wed, 16 Jan 2008 10:00:06 +0900 Tejun Heo wrote:

 Hello, all.
 
 This patchset implements printk_header() and mprintk - merging printk
 - to make printing multiline messages and assembling message
 piece-by-piece easier.
 
 In a nutshell, printk_header() lets you do the following atomically
 (against other messages).
 
  code:
+   printk_header(KERN_INFO ata1.00: , line0\nline1\nline2\n);
 
  output:
   6ata1.00: line0
   6 line1
   6 line2
 
 And mprintk the following.
 
  code:
   DEFINE_MPRINTK(mp, 2 * 80);
 
   mprintk_set_header(mp, KERN_INFO ata%u.%2u: , 1, 0);
   mprintk_push(mp, ATA %d, 7);
   mprintk_push(mp, , %u sectors\n, 1024);
   mprintk(mp, everything seems dandy\n);

Looks pretty good to me except that I would change mprintk_push to
mprintk_add or mprintk_append (I think that I prefer _add).

  output:
   6ata1.00: ATA 7, 1024 sectors
   6 everything seems dandy
 
 Please read the commit messages and comments for more detail.  If this
 patchset is accepted, I'll write up Documentation/printk.txt which
 contains describtion of the API and guidelines - don't pack unrelated
 messages into one kind of stuff.
 
 This patchset is against the current linux-2.6#master (031f2dcd) and
 contains the following patches.
 
 0001-printk-keep-log-level-on-multiline-messages.patch
 0002-printk-implement-v-printk_header.patch
 0003-printk-implement-merging-printk.patch
 0004-libata-make-libata-use-printk_header-and-mprintk.patch
 
  drivers/ata/libata-core.c   |  202 +++--
  drivers/ata/libata-eh.c |  150 --
  drivers/ata/libata-pmp.c|5 
  drivers/ata/libata-scsi.c   |6 
  drivers/ata/sata_inic162x.c |2 
  drivers/ata/sata_nv.c   |4 
  include/linux/kernel.h  |   83 ++
  include/linux/libata.h  |   35 ++--
  kernel/printk.c |  354 
 
  9 files changed, 630 insertions(+), 211 deletions(-)
 
 More than half of the code increase in kernel.h are from the dummy
 declarations for !CONFIG_PRINTK.  More than one third of printk.c
 increase are comments.  On my x86-64 configuration, printk.o grows
 from 30152 to 34128.
 
 libata code grows slightly but the increase is from converting the
 printk wrapper from #define to proper functions.  The converted areas
 - device configuration and EH reporting - were reduced in comlexity
 and size.  With all-y, drivers/ata/built-in.o shrinks from 726509 to
 717657 mostly due to the conversion away from macros.


---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] libata: make libata use printk_header() and mprintk

2008-01-15 Thread Randy Dunlap
On Wed, 16 Jan 2008 10:00:10 +0900 Tejun Heo wrote:

 Reimplement libata printk helpers using printk_header, implement
 helpers to initialize mprintk and use mprintk during device
 configuration and EH reporting.
 
 This fixes various formatting related problems of libata messages such
 as misaligned multiline messages, decoded register lines with leading
 headers making them difficult to tell to which error they belong to,
 awkward manual indents and complex message printing logics.  More
 importantly, by making message assembly flexible, this patch makes
 future changes to device configuration and EH reporting easier.
 
 Signed-off-by: Tejun Heo [EMAIL PROTECTED]
 ---
  drivers/ata/libata-core.c   |  202 
 +++
  drivers/ata/libata-eh.c |  150 +++-
  drivers/ata/libata-pmp.c|5 +-
  drivers/ata/libata-scsi.c   |6 +-
  drivers/ata/sata_inic162x.c |2 +-
  drivers/ata/sata_nv.c   |4 +-
  include/linux/libata.h  |   35 
  7 files changed, 223 insertions(+), 181 deletions(-)
 
 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
 index 4753a18..6fac482 100644
 --- a/drivers/ata/libata-core.c
 +++ b/drivers/ata/libata-core.c
 @@ -125,6 +125,79 @@ MODULE_LICENSE(GPL);
  MODULE_VERSION(DRV_VERSION);
  
  

 @@ -2295,23 +2342,18 @@ int ata_dev_configure(struct ata_device *dev)
   dev-flags |= ATA_DFLAG_DIPM;
   }
  
 - if (dev-horkage  ATA_HORKAGE_DIAGNOSTIC) {
 + if ((dev-horkage  ATA_HORKAGE_DIAGNOSTIC)  print_info) {
   /* Let the user know. We don't want to disallow opens for
  rescue purposes, or in case the vendor is just a blithering
  idiot */
 - if (print_info) {
 - ata_dev_printk(dev, KERN_WARNING,
 -Drive reports diagnostics failure. This may indicate a drive\n);
 - ata_dev_printk(dev, KERN_WARNING,
 -fault or invalid emulation. Contact drive vendor for information.\n);
 - }

Looks to me like several of these + lines have indent problems:
following lines (i.e., not first line) of function call should be
indented more than the first line:

 + ata_dev_printk(dev, KERN_WARNING,
 + Drive reports diagnostics failure. This may indicate a drive\n
 + fault or invalid emulation. Contact drive vendor for 
 information.\n);
   }
  
   /* limit bridge transfers to udma5, 200 sectors */
   if (ata_dev_knobble(dev)) {
 - if (ata_msg_drv(ap)  print_info)
 - ata_dev_printk(dev, KERN_INFO,
 -applying bridge limits\n);
 + mprintk_push(mp, , applying bridge limits);
   dev-udma_mask = ATA_UDMA5;
   dev-max_sectors = ATA_MAX_SECTORS;
   }

 diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
 index caef2bb..80bfa50 100644
 --- a/drivers/ata/libata-pmp.c
 +++ b/drivers/ata/libata-pmp.c
 @@ -408,9 +408,8 @@ static int sata_pmp_configure(struct ata_device *dev, int 
 print_info)
  
   if (!(dev-flags  ATA_DFLAG_AN))
   ata_dev_printk(dev, KERN_INFO,
 - Asynchronous notification not supported, 
 - hotplug won't\n work on fan-out 
 - ports. Use warm-plug instead.\n);

More indent needed below.

 + Asynchronous notification not supported, hotplug 
 won't\n
 + work on fan-out ports. Use warm-plug instead.\n);
   }
  
   return 0;
 diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
 index 264ae60..7c13663 100644
 --- a/drivers/ata/libata-scsi.c
 +++ b/drivers/ata/libata-scsi.c
 @@ -3207,9 +3207,9 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
   goto repeat;
   }
  
 - ata_port_printk(ap, KERN_ERR, WARNING: synchronous SCSI scan 
 - failed without making any progress,\n
 -   switching to async\n);
 + ata_port_printk(ap, KERN_ERR,

More indent needed below.

 + WARNING: synchronous SCSI scan failed without making any \n
 +  progress, switching to async\n);
   }
  
   queue_delayed_work(ata_aux_wq, ap-hotplug_task,



---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] printk: implement merging printk

2008-01-15 Thread Randy Dunlap
On Wed, 16 Jan 2008 10:00:09 +0900 Tejun Heo wrote:


 ---
  include/linux/kernel.h |   71 
  kernel/printk.c|  215 
 
  2 files changed, 286 insertions(+), 0 deletions(-)
 
 diff --git a/include/linux/kernel.h b/include/linux/kernel.h
 index ade3ac9..f92a4a1 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
 @@ -175,6 +175,29 @@ extern struct pid *session_of_pgrp(struct pid *pgrp);
  extern void dump_thread(struct pt_regs *regs, struct user *dump);
  
  #ifdef CONFIG_PRINTK
 +struct mprintk {
 + char *  header;
 + char *  body;
 + char *  cur;
 + char *  prv;
 + char *  end;

We aren't very consistent about this, but I think that we would prefer

char*header;

etc. there.


 + int overflowed;
 +};
 +
 +#define MPRINTK_INITIALIZER(_buf, _size) \
 + {   \
 + .header = NULL, \
 + .body   = _buf, \
 + .cur= _buf, \
 + .prv= NULL, \
 + .end= _buf + _size, \
 + .overflowed = 0,\
 + }
 +
 +#define DEFINE_MPRINTK(name, size)   \
 + char __##name##_buf[size];  \
 + struct mprintk name = MPRINTK_INITIALIZER(__##name##_buf, size)

---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Peculiar out-of-sync boot log lines

2007-12-01 Thread Randy Dunlap
On Sat, 1 Dec 2007 22:59:35 +0100 Bartlomiej Zolnierkiewicz wrote:

 Thanks for reporting/debugging it guys!
 
  Something in there needs to insert a '\n' before the skipping word 
  message.
  Since it doesn't do that right now, the KERN_DEBUG string appears as 7
 
 This seems like a good occasion to fix ide_dma_verbose() for good so... :)
 
 [ patch is against current Linus tree so might not apply to 2.6.23.9 ]
 
 [PATCH] ide: DMA reporting and validity checking fixes
 
 * ide_xfer_verbose() fixups:
   - beautify returned mode names
   - fix PIO5 reporting
   - make it return 'const char *'
 
 * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode().
 
 * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid
   DMA info in identify block.
 
 * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update().
 
   As a result DMA won't be tuned or will be disabled after tuning if device
   reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the
   same checks while the IDE device is probed by ide-{cd,disk} device driver).
 
 * Since (id-capability  1)  id-tDMA is a valid configuration handle
   it correctly in ide_id_dma_bug().
 
 * Remove no longer needed ide_dma_verbose().
 
 This patch should fix the following problem with out-of-sync IDE messages
 reported by Nick Warned:
 
hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache7hdd:
skipping word 93 validity check
 , UDMA(66)
 
 and later debugged by Mark Lord to be caused by:
 
 ide_dma_verbose()
 printk( ... 2048kB Cache);
 eighty_ninty_three()
 printk(KERN_DEBUG %s: skipping word 93 validity check\n);
 ide_dma_verbose()
 printk(, UDMA(66)
 
 Please note that as a result ide-{cd,disk} device drivers won't report the
 DMA speed used but this is intended since now DMA mode being used is always
 reported by IDE core code.
 
 Cc: Nick Warne [EMAIL PROTECTED]
 Cc: Mark Lord [EMAIL PROTECTED]
 Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
 ---
  drivers/ide/ide-cd.c   |7 --
  drivers/ide/ide-disk.c |5 
  drivers/ide/ide-dma.c  |   57 
 -
  drivers/ide/ide-iops.c |3 ++
  drivers/ide/ide-lib.c  |   55 ---
  include/linux/ide.h|6 ++---
  6 files changed, 51 insertions(+), 82 deletions(-)
 
 Index: b/drivers/ide/ide-cd.c
 ===
 --- a/drivers/ide/ide-cd.c
 +++ b/drivers/ide/ide-cd.c
 @@ -3049,12 +3049,7 @@ int ide_cdrom_probe_capabilities (ide_dr
  else 
   printk( drive);
  
 - printk(, %dkB Cache, be16_to_cpu(cap.buffer_size));
 -
 - if (drive-using_dma)
 - ide_dma_verbose(drive);
 -
 - printk(\n);
 + printk(, %dkB Cache\n, be16_to_cpu(cap.buffer_size));

Use
printk(KERN_CONT ...
so that someone won't try to add another KERN_* facility level to it.
(same for other continued printk calls in this patch)

  
   return nslots;
  }
 Index: b/drivers/ide/ide-disk.c
 ===
 --- a/drivers/ide/ide-disk.c
 +++ b/drivers/ide/ide-disk.c
 @@ -961,11 +961,8 @@ static void idedisk_setup (ide_drive_t *
   if (id-buf_size)
   printk ( w/%dKiB Cache, id-buf_size/2);
  
 - printk(, CHS=%d/%d/%d, 
 + printk(, CHS=%d/%d/%d\n,

Ditto.

  drive-bios_cyl, drive-bios_head, drive-bios_sect);
 - if (drive-using_dma)
 - ide_dma_verbose(drive);
 - printk(\n);
  
   /* write cache enabled? */
   if ((id-csfo  1) || (id-cfs_enable_1  (1  5)))

 Index: b/include/linux/ide.h
 ===
 --- a/include/linux/ide.h
 +++ b/include/linux/ide.h

 @@ -1333,8 +1334,7 @@ static inline void ide_set_hwifdata (ide
   hwif-hwif_data = data;
  }
  
 -/* ide-lib.c */
 -extern char *ide_xfer_verbose(u8 xfer_rate);
 +const char *ide_xfer_verbose(u8);
  extern void ide_toggle_bounce(ide_drive_t *drive, int on);
  extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);

Ideally function prototypes would include variable names, not just
types, as a helpful hint to readers of them.

---
~Randy
The Linux kernel requires that any needed documentation accompany all
changes requiring said documentation -- part of the source-code patch
must apply to the Documentation/ directory. [...]
To sum up: No undocumented changes.
-- Donnie Berkholz engages in some wishful thinking
http://lwn.net/Articles/259470/ Quote of the Week
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ide-scsi: use print_hex_dump from linux/kernel.h

2007-11-26 Thread Randy Dunlap

Matthew Wilcox wrote:

On Mon, Nov 26, 2007 at 04:37:50PM +0800, rae l wrote:

I know this is different from the original hexdump in ide-scsi.c, I
just want to tell someone that there's a good implementation of
hexdump in kernel.h, and I think the default KERN_DEBUG and
print_hex_dump is more informative and has better output. However,
anyone want more precise control on debug message could make her/his
improvements with print_hex_dump.


using KERN_DEBUG is wrong -- this is part of a line, so you need to use
KERN_NONE or simply .


s/KERN_NONE/KERN_CONT/ for continuation lines.

--
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-14 Thread Randy Dunlap
On Wed, 14 Nov 2007 15:08:47 +0100 Ingo Molnar wrote:

 
 * Randy Dunlap [EMAIL PROTECTED] wrote:
 
   (and this is in no way directed at the networking folks - it holds 
   for all of us. I have one main complaint about networking: the 
   separate netdev list is a bad idea - networking regressions should 
   be discussed and fixed on lkml, like most other subsystems are. Any 
   artificial split of the lk discussion space is bad.)
  
  but here I disagree.  LKML is already too busy and noisy. Major 
  subsystems need their own discussion areas.
 
 That's a stupid argument. We lose much more by forced isolation of 
 discussion than what we win by having less traffic! It's _MUCH_ easier 
 to narrow down information (by filter by threads, by topics, by people, 
 etc.) than it is to gobble information together from various fractured 
 sources. We learned it _again and again_ that isolation of kernel 
 discussions causes bad things.
 
 In fact this thread is the very example: David points out that on netdev 
 some of those bugs were already discussed and resolved. Had it been all 
 on lkml we'd all be aware of it.

or had someone been on netdev.

 this is a single kernel project that is released together as one 
 codebase, so a central place of discussion is obvious and common-sense.

Central doesn't have to mean one-and-only-one-list-for-everything.

 so please stop this too busy and too noisy nonsense already. It was 
 nonsense 10 years ago and it's nonsense today. In 10 years the kernel 
 grew from a 1 million lines codebase to an 8 million lines codebase, so 
 what? Deal with it and be intelligent about filtering your information 
 influx instead of imposing a hard pre-filtering criteria that restricts 
 intelligent processing of information.

So you have a preferred method of handling email.  Please don't
force it on the rest of us.

I'll plan to use lkml-list-only when you have convinced DaveM to drop
all of the other mailing lists at vger.kernel.org.  Yeah, sure.

---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-14 Thread Randy Dunlap
On Wed, 14 Nov 2007 21:16:39 +0100 Ingo Molnar wrote:


 countered by the underlined sentences above, just in case you missed it.

I didn't miss your claim.


---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-14 Thread Randy Dunlap
On Wed, 14 Nov 2007 21:37:37 +0100 Ingo Molnar wrote:

 ok, then you conceded it by not replying to it? good ;-)

No, I don't intend to carry on this discussion,
but I appreciate the smiley.

---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Randy Dunlap
On Tue, 13 Nov 2007 14:40:29 +0100 Ingo Molnar wrote:

 
 * Andrew Morton [EMAIL PROTECTED] wrote:
 
Do you believe that our response to bug reports is adequate?
   
   Do you feel that making us feel and look like shit helps?
  
  That doesn't answer my question.
  
  See, first we need to work out whether we have a problem.  If we do 
  this, then we can then have a think about what to do about it.
  
  I tried to convince the 2006 KS attendees that we have a problem and I 
  resoundingly failed.  People seemed to think that we're doing OK.

We were a minority.

  But it appears that data such as this contradicts that belief.
  
  This is not a minor matter.  If the kernel _is_ slowly deteriorating 
  then this won't become readily apparent until it has been happening 
  for a number of years.  By that stage there will be so much work to do 
  to get us back to an acceptable level that it will take a huge effort.  
  And it will take a long time after that for the kerel to get its 
  reputation back.
  
  So it is important that we catch deterioration *early* if it is 
  happening.
 

[agree with most of Ingo's moaning]

 (and this is in no way directed at the networking folks - it holds for 
 all of us. I have one main complaint about networking: the separate 
 netdev list is a bad idea - networking regressions should be discussed 
 and fixed on lkml, like most other subsystems are. Any artificial split 
 of the lk discussion space is bad.)

but here I disagree.  LKML is already too busy and noisy.
Major subsystems need their own discussion areas.

---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Randy Dunlap
On Tue, 13 Nov 2007 09:33:21 -0600 James Bottomley wrote:

 On Tue, 2007-11-13 at 03:15 -0800, Andrew Morton wrote:
  
  SCSI==
   
   qla2xxx: driver initialization does not complete when booting with
   Port connected
   http://bugzilla.kernel.org/show_bug.cgi?id=9267
   Kernel: 2.6.23.1
  
  No response from developers
 
 Urm, well, if no-one ever tells the SCSI list it's unrealistic to expect
 anyone to be working on it.  As far as I can tell, email was sent to
 Andrew Vasquez only on 31 October. However, the fault looks to be
 generic, so he probably just dropped it.

It seems that new SCSI bugs need to be sent to [EMAIL PROTECTED]

Martin, can you arrange that to happen automatically instead of
Andrew having to do it manually?

---
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] libata: fix kernel-doc param name

2007-10-18 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Fix libata kernel-doc parameter name.

Warning(linux-2.6.23-git13//drivers/ata/libata-core.c:1415): No description 
found for parameter 'sgl'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-git13.orig/drivers/ata/libata-core.c
+++ linux-2.6.23-git13/drivers/ata/libata-core.c
@@ -1392,7 +1392,7 @@ static void ata_qc_complete_internal(str
  * @tf: Taskfile registers for the command and the result
  * @cdb: CDB for packet command
  * @dma_dir: Data tranfer direction of the command
- * @sg: sg list for the data buffer of the command
+ * @sgl: sg list for the data buffer of the command
  * @n_elem: Number of sg entries
  * @timeout: Timeout in msecs (0 for default)
  *
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: sata scsi suggestion for make menuconfig

2007-09-08 Thread Randy Dunlap

Stefan Richter wrote:

(added Cc linux-ide)

Folkert van Heusden wrote:

A popup makes some sense, but I don't know if menuconfig knows how to
do popup warnings... and it needs to be done for all *configs,
not just menuconfig.

Maybe add a new type?

How about
comment Note: 'SCSI disk support' is required for SATA/PATA HDDs!
depends on ATA  !BLK_DEV_SD

Yes! Maybe create some status-line at the bottom of the screen in which
these hints scrollby. Like powertop does.


'comment' is already supported by make {menu,x,g}config and AFAIK by
make oldconfig too.  It is not effective in make oldconfig though
because it will scroll off the screen quickly.

I am not a friend of 'select', but maybe the following actually helps.
I didn't follow all of this and previous related discussions, so I guess
somebody else suggested something like this before:



The problem with 'select' here is that it will enable BLK_DEV_SD,
but if SCSI is not enabled, it will not become enabled -- i.e.,
select does not follow the dependency chain.  So usually the
kernel will not build unless SCSI is enabled by the user.


# drivers/ata/Kconfig

config ATA
[...]

comment Controller drivers

[...low-level drivers go here...]

comment Storage device drivers

config ATA_SD
tristate SATA/PATA HDD support (via SCSI disk support)
depends on ATA
select BLK_DEV_SD
help
  'SCSI disk support' is required to access SATA HDDs.  It is
  also necessary for parallel ATA (IDE) HDDs if you use the
  experimental parallel ATA option.

  You can say Y or M here to select SCSI disk support, or you
  can do so in the 'SCSI device support' section.

[...ditto for CD/DVD-ROMs, tapes, and generic support...]



--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: sata scsi suggestion for make menuconfig

2007-09-08 Thread Randy Dunlap
On Sat, 08 Sep 2007 18:44:46 +0200 Stefan Richter wrote:

 Randy Dunlap wrote:
  Stefan Richter wrote:
  I am not a friend of 'select', but maybe the following actually helps.
 ...
  The problem with 'select' here is that it will enable BLK_DEV_SD,
  but if SCSI is not enabled, it will not become enabled -- i.e.,
  select does not follow the dependency chain.  So usually the
  kernel will not build unless SCSI is enabled by the user.
 ...
  config ATA_SD
  tristate SATA/PATA HDD support (via SCSI disk support)
  depends on ATA
  select BLK_DEV_SD
  help
'SCSI disk support' is required to access SATA HDDs.  It is
 ...
 
 I checked the dependencies.  ATA depends on SCSI (actually, selects
 SCSI), so all is well.  Otherwise I would have added more dependencies
 to ATA_SD.

Ah, that's good, then.  Thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] pata_it821x: fix section mismatch warning

2007-06-25 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Fix section mismatch when CONFIG_HOTPLUG=n (but functions are used
for resume):

WARNING: drivers/ata/pata_it821x.o(.text+0x3f): Section mismatch: reference to 
.init.text: (between 'it821x_reinit_one' and 'it821x_program_udma')
WARNING: drivers/ata/pata_it821x.o(.text+0x691): Section mismatch: reference to 
.init.text: (between 'it821x_init_one' and 'it821x_passthru_set_dmamode')

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/pata_it821x.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.22-rc6.orig/drivers/ata/pata_it821x.c
+++ linux-2.6.22-rc6/drivers/ata/pata_it821x.c
@@ -690,7 +690,7 @@ static struct ata_port_operations it821x
.port_start = it821x_port_start,
 };
 
-static void __devinit it821x_disable_raid(struct pci_dev *pdev)
+static void it821x_disable_raid(struct pci_dev *pdev)
 {
/* Reset local CPU, and set BIOS not ready */
pci_write_config_byte(pdev, 0x5E, 0x01);
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: sd_resume redundant? [was: [PATCH] libata: implement ata_wait_after_reset()]

2007-05-20 Thread Randy Dunlap
On Sun, 20 May 2007 11:45:03 -0600 Robert Hancock wrote:

 Indan Zupancic wrote:
  Everything seems to work fine without sd_resume(), so why is it needed?
  Because not all disks spin up without being told to do so and like it or
  not spinning disks up on resume is the default behavior.  As I wrote in
  the other reply, it would be worthwhile to make it configurable.
  
  Not even after they receive a read command? Ugh.
 
 ATA disks are supposed to spin up, yes. SCSI disks require a command to 
 tell them to spin up if they're in the stopped state.

Good info, but linux-ide was dropped.  Is that due to lack of
reply-to-all or is it a newsgroup thing or what?


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 1/7] libata: check for AN support

2007-05-10 Thread Randy Dunlap
On Wed, 9 May 2007 22:09:52 -0700 Andrew Morton wrote:

 On Wed, 9 May 2007 16:38:09 -0700 Kristen Carlson Accardi [EMAIL PROTECTED] 
 wrote:
 
   /**
  + * ata_dev_set_AN - Issue SET FEATURES - SATA FEATURES
  + *   with sector count set to indicate
  + *   Asynchronous Notification feature
 
 I think kenreldoc requires that all this be on a single line?

Correct.

  + * @dev: Device to which command will be sent
  + *
  + * Issue SET FEATURES - SATA FEATURES command to device @dev
  + * on port @ap.
  + *
  + * LOCKING:
  + * PCI/etc. bus probe sem.
  + *
  + * RETURNS:
  + * 0 on success, AC_ERR_* mask otherwise.
  + */
 
 ooh, locking and return value documentation.  Often missed, and nice.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC/PATCH -mm] add pci_try_set_mwi

2007-04-16 Thread Randy Dunlap
On Thu, 5 Apr 2007 14:20:01 -0700 Andrew Morton wrote:

 hm. Well, what to do?
 
 How about we prevail upon Randy to:
 
 - rename pci_set_mwi() to pci_try_set_mwi()
 
 - make it return 0 on success, 1 if the try failed
 
 - make it return -EFOO on error (presently unimplemented)
 
 - review callers
 
 - remove __must_check
 
 ?



From: Randy Dunlap [EMAIL PROTECTED]

As suggested by Andrew, add pci_try_set_mwi(), which does not require
return-value checking.

- add pci_try_set_mwi() without __must_check
- make it return 0 on success, errno if the try failed or error
- review callers

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 Documentation/pci.txt  |5 +++-
 drivers/ata/pata_cs5530.c  |2 -
 drivers/ide/pci/cs5530.c   |2 -
 drivers/net/cassini.c  |4 +--
 drivers/net/starfire.c |2 -
 drivers/net/tulip/tulip_core.c |2 -
 drivers/net/wireless/mac80211/p54/prism54pci.c |2 -
 drivers/net/wireless/prism54/islpci_hotplug.c  |3 --
 drivers/pci/pci.c  |   28 +
 drivers/scsi/lpfc/lpfc_init.c  |5 
 drivers/usb/gadget/net2280.c   |2 -
 include/linux/pci.h|1 
 12 files changed, 39 insertions(+), 19 deletions(-)

--- linux-2.6.21-rc6-mm1.orig/include/linux/pci.h
+++ linux-2.6.21-rc6-mm1/include/linux/pci.h
@@ -547,6 +547,7 @@ void pci_set_master(struct pci_dev *dev)
 int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
 #define HAVE_PCI_SET_MWI
 int __must_check pci_set_mwi(struct pci_dev *dev);
+int pci_try_set_mwi(struct pci_dev *dev);
 void pci_clear_mwi(struct pci_dev *dev);
 void pci_intx(struct pci_dev *dev, int enable);
 void pci_msi_off(struct pci_dev *dev);
--- linux-2.6.21-rc6-mm1.orig/drivers/pci/pci.c
+++ linux-2.6.21-rc6-mm1/drivers/pci/pci.c
@@ -1162,6 +1162,11 @@ int pci_set_mwi(struct pci_dev *dev)
return 0;
 }
 
+int pci_try_set_mwi(struct pci_dev *dev)
+{
+   return 0;
+}
+
 void pci_clear_mwi(struct pci_dev *dev)
 {
 }
@@ -1218,9 +1223,7 @@ pci_set_cacheline_size(struct pci_dev *d
  * pci_set_mwi - enables memory-write-invalidate PCI transaction
  * @dev: the PCI device for which MWI is enabled
  *
- * Enables the Memory-Write-Invalidate transaction in %PCI_COMMAND,
- * and then calls @pcibios_set_mwi to do the needed arch specific
- * operations or a generic mwi-prep function.
+ * Enables the Memory-Write-Invalidate transaction in %PCI_COMMAND.
  *
  * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  */
@@ -1236,7 +1239,8 @@ pci_set_mwi(struct pci_dev *dev)
 
pci_read_config_word(dev, PCI_COMMAND, cmd);
if (! (cmd  PCI_COMMAND_INVALIDATE)) {
-   pr_debug(PCI: Enabling Mem-Wr-Inval for device %s\n, 
pci_name(dev));
+   pr_debug(PCI: Enabling Mem-Wr-Inval for device %s\n,
+   pci_name(dev));
cmd |= PCI_COMMAND_INVALIDATE;
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
@@ -1245,6 +1249,21 @@ pci_set_mwi(struct pci_dev *dev)
 }
 
 /**
+ * pci_try_set_mwi - enables memory-write-invalidate PCI transaction
+ * @dev: the PCI device for which MWI is enabled
+ *
+ * Enables the Memory-Write-Invalidate transaction in %PCI_COMMAND.
+ * Callers are not required to check the return value.
+ *
+ * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
+ */
+int pci_try_set_mwi(struct pci_dev *dev)
+{
+   int rc = pci_set_mwi(dev);
+   return rc;
+}
+
+/**
  * pci_clear_mwi - disables Memory-Write-Invalidate for device dev
  * @dev: the PCI device to disable
  *
@@ -1418,6 +1437,7 @@ EXPORT_SYMBOL(pci_release_selected_regio
 EXPORT_SYMBOL(pci_request_selected_regions);
 EXPORT_SYMBOL(pci_set_master);
 EXPORT_SYMBOL(pci_set_mwi);
+EXPORT_SYMBOL(pci_try_set_mwi);
 EXPORT_SYMBOL(pci_clear_mwi);
 EXPORT_SYMBOL_GPL(pci_intx);
 EXPORT_SYMBOL(pci_set_dma_mask);
--- linux-2.6.21-rc6-mm1.orig/drivers/ata/pata_cs5530.c
+++ linux-2.6.21-rc6-mm1/drivers/ata/pata_cs5530.c
@@ -270,7 +270,7 @@ static int cs5530_init_chip(void)
}
 
pci_set_master(cs5530_0);
-   pci_set_mwi(cs5530_0);
+   pci_try_set_mwi(cs5530_0);
 
/*
 * Set PCI CacheLineSize to 16-bytes:
--- linux-2.6.21-rc6-mm1.orig/drivers/ide/pci/cs5530.c
+++ linux-2.6.21-rc6-mm1/drivers/ide/pci/cs5530.c
@@ -236,7 +236,7 @@ static unsigned int __devinit init_chips
 */
 
pci_set_master(cs5530_0);
-   pci_set_mwi(cs5530_0);
+   pci_try_set_mwi(cs5530_0);
 
/*
 * Set PCI CacheLineSize to 16-bytes:
--- linux-2.6.21-rc6-mm1.orig/drivers/usb/gadget/net2280.c
+++ linux-2.6.21-rc6-mm1/drivers/usb/gadget/net2280.c
@@ -2964,7 +2964,7 @@ static int net2280_probe (struct pci_dev
, dev-pci-pcimstctl

Re: [PATCH] HPA support: Revised patch

2007-04-05 Thread Randy Dunlap
On Thu, 5 Apr 2007 14:13:52 +0100 Alan Cox wrote:

 This one should fix the problems with slave devices and the Macintosh hang

s/Performa/Perform/g

 +/**
 + *   ata_read_native_max_address_ext -   LBA48 native max query
 + *   @dev: Device to query
 + *
 + *   Performa an LBA48 size query upon the device in question. Return the
 + *   actual LBA48 size or zero if the command fails.
 + */
 +
 +static u64 ata_read_native_max_address_ext(struct ata_device *dev)
 +{
 +}
 +
 +/**
 + *   ata_read_native_max_address -   LBA28 native max query
 + *   @dev: Device to query
 + *
 + *   Performa an LBA28 size query upon the device in question. Return the
 + *   actual LBA28 size or zero if the command fails.
 + */
 +
 +static u64 ata_read_native_max_address(struct ata_device *dev)
 +{
 +}


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] IDE: fix PCI must_checks

2007-04-05 Thread Randy Dunlap

Andrew Morton wrote:

On Thu, 5 Apr 2007 21:16:09 +0100
Alan Cox [EMAIL PROTECTED] wrote:


pci_set_mwi() is an advisory thing, and on certain platforms it might fail
to set the cacheline size to the desired number.  This is not a fatal error
and the driver can successfully run at a lesser performance level.

Correct.


If that description is accurate then I'd contend that pci_set_mwi() is
misdesigned.  It should not be returning a negative error code for
something which is not an error.

It is an error to *some* drivers but not all. Kind of like setting some
of the other features may be essential for some chips and not others.


And we *need* to be excessively anal in the PCI setup code.  We have metric
shitloads of bugs due to problems in that area, and the more formality and
error handling and error reporting we can get in there the better off we
will be.

No argument there

If we want to deal with some of the mess we should also remove all direct
writing of PCI latency timers and replace them with a function to stop
drivers setting unsafe values and ignoring chip errata the core knows
about but they dont


hm. Well, what to do?

How about we prevail upon Randy to:

- rename pci_set_mwi() to pci_try_set_mwi()

- make it return 0 on success, 1 if the try failed

- make it return -EFOO on error (presently unimplemented)

- review callers

- remove __must_check

?


That's fine with me.  Any comments on that, Alan?

I'm not sure that I like the proposed return values of
pci_try_set_mwi(), but I'm easy.


I have a feeling that this is still wrong: even things like
pci_read_config_foo() can get errors, and there are various PCI-bus error
handling proposals floating about which might require that callers be more
careful in what they accept.



--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Randy Dunlap
On Wed, 28 Mar 2007 20:04:57 +0200 Michael S. Tsirkin wrote:

  Subject: first disk access after resume takes several minutes
   ('date' does not advance after resume from RAM, CONFIG_NO_HZ=n)
  References : http://lkml.org/lkml/2007/3/8/117
   http://lkml.org/lkml/2007/3/25/20
  Submitter  : Michael S. Tsirkin [EMAIL PROTECTED]
 
 ...
 
  Subject: after resume: X hangs after drawing a couple of windows
  References : http://lkml.org/lkml/2007/3/8/117
  Submitter  : Michael S. Tsirkin [EMAIL PROTECTED]
  Status : unknown
 
 ...
 
 From: Jeff Chua [EMAIL PROTECTED]
  It's related. I tested without CONFIG_HPET_TIMER, and now my X60 can
  suspend and resume from RAM (s2ram). Even better, it works
  with/without CONFIG_NO_HZ.
  
  Quoting Maxim [EMAIL PROTECTED]:
  
  Hi,
  I almost sure Iknow why this happens,
  The problem is that both hpet clock source
  and hpet clockevents doesn't have a suspend/resume function
  On resume we should enable the main counter _and_ enable
  legacy replacement mode, On my system main counter in
  enabled, by I think by bios, but legacy replacement mode is
  not, so if a system doesn't use lapic as a tick source, but
  use hpet+broadcast, it will hang for sure on resume, and i
  tested it
  
  The patch below is a temporally fix, until
  clock-events and clocksources will get proper suspend/resume
  hooks:
  
  Regards,
  Maxim Levitsky
 
 Bingo!
 
 The patch below fixes the two problems (listed above) with
 resume from RAM that I have observed on my T60 with
 2.6.21-rc5: with this patch applied, and with CONFIG_NO_HZ
 unset, date advances correctly, X functions properly and
 there is no delay on first disk access.
 
 Thanks very much.
 
 ---
  Add suspend/resume for HPET
  Signed-off-by: Maxim Levitsky [EMAIL PROTECTED]
 
 Maxim, do you plan to send this upstream?

with whitespace fixes, please...


 Acked-by: Michael S. Tsirkin [EMAIL PROTECTED]
 
 ---
 
 diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
 index 0fd9fba..a1ec79e 100644
 --- a/arch/i386/kernel/hpet.c
 +++ b/arch/i386/kernel/hpet.c
 @@ -152,6 +152,16 @@ static void hpet_set_mode(enum clock_event_mode mode,
   unsigned long cfg, cmp, now;
   uint64_t delta;
  
 +
 + if ( mode != CLOCK_EVT_MODE_UNUSED  mode != CLOCK_EVT_MODE_SHUTDOWN)
 + {

if (mode != CLOCK_EVT_MODE_UNUSED  mode != CLOCK_EVT_MODE_SHUTDOWN) {

 + unsigned long cfg = hpet_readl(HPET_CFG);
 + cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY;
 + hpet_writel(cfg, HPET_CFG);
 + 

delete above line.

 + }
 + 
 +
   switch(mode) {
   case CLOCK_EVT_MODE_PERIODIC:
   delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: HPA patches

2007-03-23 Thread Randy Dunlap
On Fri, 23 Mar 2007 20:08:19 + Alan Cox wrote:

   +static int ata_ignore_hpa = 0;
  
  Don't init to 0.  Not needed, bloats binary files.
 
 It'll be one for the final release 8)
 
   +module_param_named(ignore_hpa, ata_ignore_hpa, int, 0644);
   +MODULE_PARM_DESC(ignore_hpa, Ignore HPA (0=off 1=on));
  
  So 1 = on = ignore, right?
 
 Yes.
 
   + tf.command = ATA_CMD_READ_NATIVE_MAX_EXT;
   + tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 | ATA_TFLAG_ISADDR;
   + tf.protocol |= ATA_PROT_NODATA;
   + tf.device = 0x40;
  
  What is 0x40?  can it be #defined (or enum-ed) instead of a magic
  value?  please?  (more of same below)
 
 It's 0x40. Its a command dependant bit - no useful name.

dependent.  OK, thanks.

   + u64 sectors = dev-n_sectors;
   + u64 hpa_sectors;
   + 
   + if (ata_id_has_lba48(dev-id))
   + hpa_sectors = ata_read_native_max_address_ext(dev);
   + else
   + hpa_sectors = ata_read_native_max_address(dev);
   +
   + /* if no hpa, both should be equal */
   + ata_dev_printk(dev, KERN_INFO, %s 1: sectors = %lld, hpa_sectors = 
   %lld\n,
   + __FUNCTION__, sectors, hpa_sectors);
  
  (long long) or (unsigned long long) on sectors and hpa_sectors...
 
 u64 is always unsigned long long (and its debug anyway)
 
  
   +
   + if (hpa_sectors  sectors) {
   + ata_dev_printk(dev, KERN_INFO,
   + Host Protected Area detected:\n
   + \tcurrent size: %lld sectors\n
   + \tnative size: %lld sectors\n,
   + sectors, hpa_sectors);
  
  printk format types ok?
 
 Yes
 
   + if (hpa_sectors) {
   + ata_dev_printk(dev, KERN_INFO,
   + native size increased to %lld 
   sectors\n, hpa_sectors);
  
  Line lengths  80 and printk format types?
 
 See above, and the 80 column fascists can suffer in the name of
 readability. 

Already corrected (printk types).  And putting
hpa_sectors);
on a separate line doesn't hurt readability.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] libata: kernel-doc fix

2007-03-16 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Warning(linux-2621-rc3g7/drivers/ata/libata-core.c:842): No description found 
for parameter 'unknown'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2621-rc4.orig/drivers/ata/libata-core.c
+++ linux-2621-rc4/drivers/ata/libata-core.c
@@ -826,7 +826,7 @@ static u64 ata_id_n_sectors(const u16 *i
 /**
  * ata_id_to_dma_mode  -   Identify DMA mode from id block
  * @dev: device to identify
- * @mode: mode to assume if we cannot tell
+ * @unknown: mode to assume if we cannot tell
  *
  * Set up the timing values for the device based upon the identify
  * reported values for the DMA mode. This function is used by drivers
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] SATA: use NULL for ptrs

2007-02-13 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED]

Fix sparse warnings in SATA:
drivers/ata/sata_sil.c:342:9: warning: Using plain integer as NULL pointer
drivers/ata/sata_mv.c:2056:55: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/sata_mv.c  |2 +-
 drivers/ata/sata_sil.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.20-git9.orig/drivers/ata/sata_mv.c
+++ linux-2.6.20-git9/drivers/ata/sata_mv.c
@@ -2053,7 +2053,7 @@ static void mv_port_init(struct ata_iopo
port-altstatus_addr = port-ctl_addr = shd_base + SHD_CTL_AST_OFS;
 
/* unused: */
-   port-cmd_addr = port-bmdma_addr = port-scr_addr = 0;
+   port-cmd_addr = port-bmdma_addr = port-scr_addr = NULL;
 
/* Clear any currently outstanding port interrupt conditions */
serr_ofs = mv_scr_offset(SCR_ERROR);
--- linux-2.6.20-git9.orig/drivers/ata/sata_sil.c
+++ linux-2.6.20-git9/drivers/ata/sata_sil.c
@@ -339,7 +339,7 @@ static inline void __iomem *sil_scr_addr
break;
}
 
-   return 0;
+   return NULL;
 }
 
 static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg)
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.19-rc1] Toshiba TC86C001 IDE driver

2006-12-12 Thread Randy Dunlap

Sergei Shtylyov wrote:

Hello.

Randy Dunlap wrote:

Behold!  This is the driver for the Toshiba TC86C001 GOKU-S IDE 
controller,
completely reworked from the original brain-damaged Toshiba's 2.4 
version.


This single channel UltraDMA/66 controller is very simple in 
programming, yet
Toshiba managed to plant many interesting bugs in it.  The 
particularly nasty
limitation 5 (as they call the errata) caused me to abuse the IDE 
core in a
possibly most interesting way so far.  However, this is still better 
than the
#ifdef mess in drivers/ide/ide-io.c that the original version 
included (well,

it had much more mess)...



Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]


drivers/ide/Kconfig|5 drivers/ide/pci/Makefile   |1 
drivers/ide/pci/tc86c001.c |  304 
+

drivers/pci/quirks.c   |   18 ++
include/linux/pci_ids.h|1 5 files changed, 329 insertions(+)

Index: linux-2.6/drivers/ide/Kconfig
===
--- linux-2.6.orig/drivers/ide/Kconfig
+++ linux-2.6/drivers/ide/Kconfig
@@ -742,6 +742,11 @@ config BLK_DEV_VIA82CXXX
  This allows the kernel to change PIO, DMA and UDMA speeds and to
  configure the chip to optimum performance.

+config BLK_DEV_TC86C001
+tristate Toshiba TC86C001 support



Needs something here like lots of other IDE PCI drivers have:
depends on PCI  BLK_DEV_IDEPCI



or at least:  depends on PCI


   No, it's already under if BLK_DEV_IDEPCI. And if you really look into 
Kconfig you'll see hwo it's done there...



+help
+This driver adds support for Toshiba TC86C001 GOKU-S chip.
+
endif


   Here's that endif.


Ack.  Thanks.

--
~Randy
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ata/kconfig: Re: Why SCSI module needed for PCI-IDE ATA only disks ?

2006-12-05 Thread Randy Dunlap
On Tue, 05 Dec 2006 21:46:54 -0500 Ed Sweetman wrote:

-ETOOMANYWORDS  -ENOPATCH, so here is one to consider.
Help text can also be added.  supply text
This is similar to what USB storage already does.

---
From: Randy Dunlap [EMAIL PROTECTED]

Provide more clues about SCSI config options that are needed
for libata (SATA/PATA) drivers.

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 drivers/ata/Kconfig |9 +
 1 file changed, 9 insertions(+)

--- linux-2.6.19-git7.orig/drivers/ata/Kconfig
+++ linux-2.6.19-git7/drivers/ata/Kconfig
@@ -17,6 +17,15 @@ config ATA
  that speaks the ATA protocol, also called ATA controller),
  because you will be asked for it.
 
+comment NOTE: ATA enables basic SCSI support; *however*,
+   depends on ATA
+comment + 'SCSI disk support', 'SCSI tape support', or '
+   depends on ATA
+comment + 'SCSI CDROM support' may also be needed,
+   depends on ATA
+comment + depending on your hardware configuration.
+   depends on ATA
+
 if ATA
 
 config SATA_AHCI
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html