[GIT PULL] IEEE1394 fix

2007-09-20 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive the following fix, or simply apply from this mail.


 drivers/ieee1394/ieee1394_core.c |2 +-
 drivers/ieee1394/ohci1394.c  |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

commit be7963b7e7f08a149e247c0bf29a4abd174e0929
Author: Stefan Richter <[EMAIL PROTECTED]>
Date:   Thu Sep 20 21:17:33 2007 +0200

ieee1394: ohci1394: fix initialization if built non-modular

Initialization of ohci1394 was broken according to one reporter if the
driver was statically linked, i.e. not built as loadable module.  Dmesg:

  PCI: Device :02:07.0 not available because of resource collisions
  ohci1394: Failed to enable OHCI hardware.

This was reported for a Toshiba Satellite 5100-503.  The cause is commit
8df4083c5291b3647e0381d3c69ab2196f5dd3b7 in Linux 2.6.19-rc1 which only
served purposes of early remote debugging via FireWire.  This
functionality is better provided by the currently out-of-tree driver
ohci1394_earlyinit.  Reversal of the commit was OK'd by Andi Kleen.

Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>

diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index ee45259..98fd985 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -1273,7 +1273,7 @@ static void __exit ieee1394_cleanup(void)
unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
 }
 
-fs_initcall(ieee1394_init); /* same as ohci1394 */
+module_init(ieee1394_init);
 module_exit(ieee1394_cleanup);
 
 /* Exported symbols */
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 5667c81..372c5c1 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3537,7 +3537,5 @@ static int __init ohci1394_init(void)
return pci_register_driver(_pci_driver);
 }
 
-/* Register before most other device drivers.
- * Useful for remote debugging via physical DMA, e.g. using firescope. */
-fs_initcall(ohci1394_init);
+module_init(ohci1394_init);
 module_exit(ohci1394_cleanup);

-- 
Stefan Richter
-=-=-=== =--= =-=--
http://arcgraph.de/sr/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] IEEE1394 fix

2007-09-20 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive the following fix, or simply apply from this mail.


 drivers/ieee1394/ieee1394_core.c |2 +-
 drivers/ieee1394/ohci1394.c  |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

commit be7963b7e7f08a149e247c0bf29a4abd174e0929
Author: Stefan Richter [EMAIL PROTECTED]
Date:   Thu Sep 20 21:17:33 2007 +0200

ieee1394: ohci1394: fix initialization if built non-modular

Initialization of ohci1394 was broken according to one reporter if the
driver was statically linked, i.e. not built as loadable module.  Dmesg:

  PCI: Device :02:07.0 not available because of resource collisions
  ohci1394: Failed to enable OHCI hardware.

This was reported for a Toshiba Satellite 5100-503.  The cause is commit
8df4083c5291b3647e0381d3c69ab2196f5dd3b7 in Linux 2.6.19-rc1 which only
served purposes of early remote debugging via FireWire.  This
functionality is better provided by the currently out-of-tree driver
ohci1394_earlyinit.  Reversal of the commit was OK'd by Andi Kleen.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]

diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index ee45259..98fd985 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -1273,7 +1273,7 @@ static void __exit ieee1394_cleanup(void)
unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
 }
 
-fs_initcall(ieee1394_init); /* same as ohci1394 */
+module_init(ieee1394_init);
 module_exit(ieee1394_cleanup);
 
 /* Exported symbols */
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 5667c81..372c5c1 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3537,7 +3537,5 @@ static int __init ohci1394_init(void)
return pci_register_driver(ohci1394_pci_driver);
 }
 
-/* Register before most other device drivers.
- * Useful for remote debugging via physical DMA, e.g. using firescope. */
-fs_initcall(ohci1394_init);
+module_init(ohci1394_init);
 module_exit(ohci1394_cleanup);

-- 
Stefan Richter
-=-=-=== =--= =-=--
http://arcgraph.de/sr/

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] ieee1394 fix

2007-03-23 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive the appended fix for 2.6.21-rc4. Or apply from this mail.
Thanks.

(The eth1394 issue will be revised as soon as ieee1394 core got rid of
class_Device.)

 drivers/ieee1394/eth1394.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Stefan Richter (1):
  ieee1394: fix oops on "modprobe -r ohci1394" after network class_device 
conversion



>From 7a9eeb2fa1b3a3a83670b9ba08dd396beedb88f8 Mon Sep 17 00:00:00 2001
From: Stefan Richter <[EMAIL PROTECTED]>
Date: Tue, 20 Mar 2007 22:43:22 +0100
Subject: [PATCH] ieee1394: fix oops on "modprobe -r ohci1394" after network 
class_device conversion
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The networking subsystem has been converted from class_device to device
but ieee1394 hasn't.  This results in a 100% reproducible NULL pointer
dereference if the ohci1394 driver module is unloaded while the eth1394
module is still loaded.
http://lkml.org/lkml/2006/11/16/147
http://lkml.org/lkml/2007/3/14/4

This is a regression in 2.6.21-rc1.

Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
Tested-by: Ismail Dönmez <[EMAIL PROTECTED]>
---
 drivers/ieee1394/eth1394.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index a953135..03e44b3 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -584,7 +584,10 @@ static void ether1394_add_host (struct hpsb_host *host)
 }
 
SET_MODULE_OWNER(dev);
+#if 0
+   /* FIXME - Is this the correct parent device anyway? */
SET_NETDEV_DEV(dev, >device);
+#endif
 
priv = netdev_priv(dev);
 
-- 
1.4.4.4





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] ieee1394 fix

2007-03-23 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive the appended fix for 2.6.21-rc4. Or apply from this mail.
Thanks.

(The eth1394 issue will be revised as soon as ieee1394 core got rid of
class_Device.)

 drivers/ieee1394/eth1394.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Stefan Richter (1):
  ieee1394: fix oops on modprobe -r ohci1394 after network class_device 
conversion



From 7a9eeb2fa1b3a3a83670b9ba08dd396beedb88f8 Mon Sep 17 00:00:00 2001
From: Stefan Richter [EMAIL PROTECTED]
Date: Tue, 20 Mar 2007 22:43:22 +0100
Subject: [PATCH] ieee1394: fix oops on modprobe -r ohci1394 after network 
class_device conversion
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The networking subsystem has been converted from class_device to device
but ieee1394 hasn't.  This results in a 100% reproducible NULL pointer
dereference if the ohci1394 driver module is unloaded while the eth1394
module is still loaded.
http://lkml.org/lkml/2006/11/16/147
http://lkml.org/lkml/2007/3/14/4

This is a regression in 2.6.21-rc1.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
Tested-by: Ismail Dönmez [EMAIL PROTECTED]
---
 drivers/ieee1394/eth1394.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index a953135..03e44b3 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -584,7 +584,10 @@ static void ether1394_add_host (struct hpsb_host *host)
 }
 
SET_MODULE_OWNER(dev);
+#if 0
+   /* FIXME - Is this the correct parent device anyway? */
SET_NETDEV_DEV(dev, host-device);
+#endif
 
priv = netdev_priv(dev);
 
-- 
1.4.4.4





-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] ieee1394 fix

2007-01-10 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive a fix for a regression since 2.6.19 inclusive.
(Or apply from this mail.)

 drivers/ieee1394/sbp2.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


commit 1a74bc68e4c0534d150e6454b45a70dab831fa32
Author: Stefan Richter <[EMAIL PROTECTED]>
Date:   Wed Jan 10 20:17:15 2007 +0100

ieee1394: sbp2: fix probing of some DVD-ROM/RWs

Since commit 98e238cd42be6c0852da519303cf0182690f8d9f in Linux 2.6.19,
"ieee1394: sbp2: don't prefer MODE SENSE 10", some FireWire DVD-ROMs and
DVD-RWs were mistaken as CD-ROM because sr_mod now sent MODE SENSE 6.
The MMC command set includes only MODE SENSE 10.
http://bugzilla.kernel.org/show_bug.cgi?id=7800

This fix lets sbp2 switch scsi_device.use_10_for_rw on for MMC LUs.
This should rather be done in the command set driver sr_mod, not in the
sbp2 transport driver, and an according patch will follow for a next
Linux release.

Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 2b5d7ab..4325aac 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -2020,6 +2020,8 @@ static int sbp2scsi_slave_configure(stru
blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
sdev->use_10_for_rw = 1;
 
+   if (sdev->type == TYPE_ROM)
+   sdev->use_10_for_ms = 1;
if (sdev->type == TYPE_DISK &&
lu->workarounds & SBP2_WORKAROUND_MODE_SENSE_8)
sdev->skip_ms_page_8 = 1;


-- 
Stefan Richter
-=-=-=== ---= -=-=-
http://arcgraph.de/sr/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] ieee1394 fix

2007-01-10 Thread Stefan Richter
Linus, please pull from the for-linus branch at

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 
for-linus

to receive a fix for a regression since 2.6.19 inclusive.
(Or apply from this mail.)

 drivers/ieee1394/sbp2.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


commit 1a74bc68e4c0534d150e6454b45a70dab831fa32
Author: Stefan Richter [EMAIL PROTECTED]
Date:   Wed Jan 10 20:17:15 2007 +0100

ieee1394: sbp2: fix probing of some DVD-ROM/RWs

Since commit 98e238cd42be6c0852da519303cf0182690f8d9f in Linux 2.6.19,
ieee1394: sbp2: don't prefer MODE SENSE 10, some FireWire DVD-ROMs and
DVD-RWs were mistaken as CD-ROM because sr_mod now sent MODE SENSE 6.
The MMC command set includes only MODE SENSE 10.
http://bugzilla.kernel.org/show_bug.cgi?id=7800

This fix lets sbp2 switch scsi_device.use_10_for_rw on for MMC LUs.
This should rather be done in the command set driver sr_mod, not in the
sbp2 transport driver, and an according patch will follow for a next
Linux release.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
---
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 2b5d7ab..4325aac 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -2020,6 +2020,8 @@ static int sbp2scsi_slave_configure(stru
blk_queue_dma_alignment(sdev-request_queue, (512 - 1));
sdev-use_10_for_rw = 1;
 
+   if (sdev-type == TYPE_ROM)
+   sdev-use_10_for_ms = 1;
if (sdev-type == TYPE_DISK 
lu-workarounds  SBP2_WORKAROUND_MODE_SENSE_8)
sdev-skip_ms_page_8 = 1;


-- 
Stefan Richter
-=-=-=== ---= -=-=-
http://arcgraph.de/sr/

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/