Deepak Saxena | 1 Oct 2005 09:44

[PATCH] [IDE] kmalloc + memset -> kzalloc conversion


Signed-off-by: Deepak Saxena <dsaxena <at> plexity.net>

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
 <at>  <at>  -3449,7 +3449,7  <at>  <at>  static int ide_cd_probe(struct device *d
 		printk(KERN_INFO "ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
 		goto failed;
 	}
-	info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
+	info = (struct cdrom_info *) kzalloc (sizeof (struct cdrom_info), GFP_KERNEL);
 	if (info == NULL) {
 		printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name);
 		goto failed;
 <at>  <at>  -3463,8 +3463,6  <at>  <at>  static int ide_cd_probe(struct device *d

 	ide_register_subdriver(drive, &ide_cdrom_driver);

-	memset(info, 0, sizeof (struct cdrom_info));
-
 	kref_init(&info->kref);

 	info->drive = drive;
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
 <at>  <at>  -1215,7 +1215,7  <at>  <at>  static int ide_disk_probe(struct device 
 	if (drive->media != ide_disk)
 		goto failed;
(Continue reading)

Jiri Slaby | 1 Oct 2005 13:08
Picon
Gravatar

Re: [PATCH] [IDE] kmalloc + memset -> kzalloc conversion

Deepak Saxena napsal(a):

>Signed-off-by: Deepak Saxena <dsaxena <at> plexity.net>
>
>diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
>--- a/drivers/ide/ide-cd.c
>+++ b/drivers/ide/ide-cd.c
> <at>  <at>  -3449,7 +3449,7  <at>  <at>  static int ide_cd_probe(struct device *d
> 		printk(KERN_INFO "ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
> 		goto failed;
> 	}
>-	info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
>+	info = (struct cdrom_info *) kzalloc (sizeof (struct cdrom_info), GFP_KERNEL);
>  
>
no need to cast and 80 chars on a line is upper bound.

> 	if (info == NULL) {
> 		printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name);
> 		goto failed;
> <at>  <at>  -3463,8 +3463,6  <at>  <at>  static int ide_cd_probe(struct device *d
> 
> 	ide_register_subdriver(drive, &ide_cdrom_driver);
> 
>-	memset(info, 0, sizeof (struct cdrom_info));
>-
> 	kref_init(&info->kref);
> 
> 	info->drive = drive;
>diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
(Continue reading)

Jiri Slaby | 1 Oct 2005 13:18
Picon

Re: [PATCH] [IDE] kmalloc + memset -> kzalloc conversion

On 10/1/05, Jiri Slaby <jirislaby <at> gmail.com> wrote:
> Deepak Saxena napsal(a):
>
> >Signed-off-by: Deepak Saxena <dsaxena <at> plexity.net>
> >
> >diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> >--- a/drivers/ide/ide-cd.c
> >+++ b/drivers/ide/ide-cd.c
> > <at>  <at>  -3449,7 +3449,7  <at>  <at>  static int ide_cd_probe(struct device *d
> >               printk(KERN_INFO "ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
> >               goto failed;
> >       }
> >-      info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
> >+      info = (struct cdrom_info *) kzalloc (sizeof (struct cdrom_info), GFP_KERNEL);
> >
> >
> no need to cast and 80 chars on a line is upper bound.
>
> >       if (info == NULL) {
> >               printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name);
> >               goto failed;
> > <at>  <at>  -3463,8 +3463,6  <at>  <at>  static int ide_cd_probe(struct device *d
> >
> >       ide_register_subdriver(drive, &ide_cdrom_driver);
> >
> >-      memset(info, 0, sizeof (struct cdrom_info));
> >-
> >       kref_init(&info->kref);
> >
> >       info->drive = drive;
(Continue reading)

Adrian Bunk | 1 Oct 2005 17:53
Picon

[2.6 patch] drivers/ide/: possible cleanups

This patch contains the following possible cleanups:
- pci/cy82c693.c: make a needlessly global function static
- remove the following unneeded EXPORT_SYMBOL's:
  - ide-taskfile.c: do_rw_taskfile
  - ide-iops.c: default_hwif_iops
  - ide-iops.c: default_hwif_transport
  - ide-iops.c: wait_for_ready

Signed-off-by: Adrian Bunk <bunk <at> stusta.de>

---

This patch was already sent on:
- 20 Aug 2005

 drivers/ide/ide-iops.c     |    6 ------
 drivers/ide/ide-taskfile.c |    2 --
 drivers/ide/pci/cy82c693.c |    2 +-
 3 files changed, 1 insertion(+), 9 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/ide/ide-taskfile.c.old	2005-02-05 02:57:03.000000000 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/ide/ide-taskfile.c	2005-02-05 02:57:12.000000000 +0100
 <at>  <at>  -161,8 +161,6  <at>  <at> 
 	return ide_stopped;
 }

-EXPORT_SYMBOL(do_rw_taskfile);
-
 /*
  * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
(Continue reading)

Mark Lord | 1 Oct 2005 20:24
Picon
Favicon

Re: SATA suspend/resume (was Re: [PATCH] updated version of Jens' SATA suspend-to-ram patch)

Jeff Garzik wrote:
..
> Ah hah!  I found the other SCSI suspend patch:
>     http://lwn.net/Articles/97453/
> Anybody (Joshua?) up for reconciling and testing the two?

I just now tried out *only* "the other SCSI suspend patch",
and by itself it hangs on resume.  Laptop computer, blank screen,
no serial ports, no printk()s visible.

And there's one minor bug in that patch:  it uses GFP_KERNEL to
alloc a buffer, but on resume it really should use GFP_ATOMIC instead,
since the swap device is the same drive we're trying to resume..

> 2) sd should call START STOP UNIT on resume

That's probably why it hangs when used as-is by itself.
I may do some further testing.

Anyone else out there playing with this yet?
Randy.Dunlap | 1 Oct 2005 20:39

Re: SATA suspend/resume (was Re: [PATCH] updated version of Jens' SATA suspend-to-ram patch)

On Sat, 01 Oct 2005 14:24:12 -0400 Mark Lord wrote:

> Jeff Garzik wrote:
> ..
> > Ah hah!  I found the other SCSI suspend patch:
> >     http://lwn.net/Articles/97453/
> > Anybody (Joshua?) up for reconciling and testing the two?
> 
> I just now tried out *only* "the other SCSI suspend patch",
> and by itself it hangs on resume.  Laptop computer, blank screen,
> no serial ports, no printk()s visible.
> 
> And there's one minor bug in that patch:  it uses GFP_KERNEL to
> alloc a buffer, but on resume it really should use GFP_ATOMIC instead,
> since the swap device is the same drive we're trying to resume..
> 
> > 2) sd should call START STOP UNIT on resume
> 
> That's probably why it hangs when used as-is by itself.
> I may do some further testing.
> 
> Anyone else out there playing with this yet?

Not playing with it yet, just making some changes as suggested
by Jeff and Christoph.  Patches are in
  http://www.xenotime.net/linux/scsi/

1.  http://www.xenotime.net/linux/scsi/scsi-suspend-resume.patch
2.  http://www.xenotime.net/linux/scsi/scsi-susres-startstop2.patch

(Continue reading)

Uplink | 2 Oct 2005 01:56
Picon

drive appears confused (ireason = 0x01)

Hi,

This may concern you in part. Parts that you feel that don't concern 
IDE, please forward to the ones responsible.

Since kernel 2.6.13 I get a "cdrom_pc_intr: The drive appears confused 
(ireason = 0x01)" message when trying to access the DVD drive and I 
can't read any disks.

I just booted 2.6.14-rc3 and I still get it. I also get some weird 
things in syslog:

Oct  1 23:45:24 dcerouter kernel: hda: cde appears confused (ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdroe appears confused (ireason = 
0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdroe appears confused (ireason = 
0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdre appears confused (ireason = 
0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_e appears confused 
(ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_intr: The e appears 
confused (ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_intr: Te appears 
confused (ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_intr:e appears confused 
(ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_intr:e appears confused 
(ireason = 0x01)
Oct  1 23:45:24 dcerouter kernel: hda: cdrom_pc_intre appears confused 
(Continue reading)

Tejun Heo | 2 Oct 2005 04:54
Picon

[PATCH libata-dev:upstream] libata: add ATA exceptions chapter to doc

 Hello, Jeff.

 This patch adds ATA errors & exceptions chapter to
Documentation/DocBook/libata.tmpl.  As suggested, the chapter is
placed before low level driver specific chapters.  Contents are
unchanged from the last posting.

 Thanks.

P.S.: (being persistent...) eh doc review please :-)

Signed-off-by: Tejun Heo <htejun <at> gmail.com>

diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
 <at>  <at>  -787,6 +787,722  <at>  <at>  and other resources, etc.
 !Idrivers/scsi/libata-scsi.c
   </chapter>

+  <chapter id="ataExceptions">
+     <title>ATA errors &amp; exceptions</title>
+
+  <para>
+  This chapter tries to identify what error/exception conditions exist
+  for ATA/ATAPI devices and describe how they should be handled in
+  implementation-neutral way.
+  </para>
+
+  <para>
(Continue reading)

jordanklist | 3 Oct 2005 04:20
Picon
Favicon

(unknown)

I am posting this with the hope that someone will revisit a bug that I have
found many people are experiencing with the PDC202xx_old driver.  The problem
is that whenever a drive is connected to each ide port, and the drives are put
under load, generally just sending an hdparm -d1 -c3 -X69 /dev/... once or
twice will do the trick.  I have read many posts and I believe archives of this
list saying it has been fixed.  I have applied patches that I've found, and I
have discovered that the problem still exists in 2.6.14-rc3.  If there is
anything I can do to help solve this issue, I will be more than happy to help.

Have a great day!

Jordan
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jens Axboe | 3 Oct 2005 09:33
Picon

Re: drive appears confused (ireason = 0x01)

On Sun, Oct 02 2005, Uplink wrote:
> Hi,
> 
> This may concern you in part. Parts that you feel that don't concern 
> IDE, please forward to the ones responsible.
> 
> Since kernel 2.6.13 I get a "cdrom_pc_intr: The drive appears confused 
> (ireason = 0x01)" message when trying to access the DVD drive and I 
> can't read any disks.
> 
> I just booted 2.6.14-rc3 and I still get it. I also get some weird 
> things in syslog:
> 
> Oct  1 23:45:24 dcerouter kernel: hda: cde appears confused (ireason = 0x01)
> Oct  1 23:45:24 dcerouter kernel: hda: cdroe appears confused (ireason = 
> 0x01)

Can you try reversing this patch from 2.6.13/2.6.14-rc3 and see if it
makes a difference?

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
 <at>  <at>  -431,7 +431,7  <at>  <at>  void cdrom_analyze_sense_data(ide_drive_
 #if VERBOSE_IDE_CD_ERRORS
 	{
 		int i;
-		const char *s;
+		const char *s = "bad sense key!";
 		char buf[80];
(Continue reading)


Gmane