FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 06-11-2010, 08:44 PM
David Cantrell
 
Default Rebind hybrid lcs/ctc network devices to correct driver if necessary (#596826)

Ack, applying.

On Sat, 5 Jun 2010, Steffen Maier wrote:


There are two network device types 3088/08 and 3088/1f which can be
either lcs or ctc. Therefore, both device drivers lcs and ctcm are
loaded and the one that happens to get loaded first binds such devices.
If the user specified the device to be handled by the other driver,
then rebind the subchannels to the specified driver.

Related: rhbz#557522
Related: rhbz#561814
---
loader/linuxrc.s390 | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 093e38d..8be39f1 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -1338,6 +1338,32 @@ function handle_subchannels() {
else
driver=$NETTYPE
fi
+ # if necessary,
+ # rebind hybrid devices (3088/08 and 3088/1f) to user specified driver
+ local curdrv
+ curdrv=$(readlink /sys/bus/ccw/devices/$SCH_R_DEVBUSID/driver)
+ curdrv=${curdrv##*/}
+ if [ "$curdrv" = "lcs" -a "$NETTYPE" = "ctc" ]; then
+ sysecho /sys/bus/ccw/drivers/lcs/unbind "$SCH_R_DEVBUSID"
+ sysecho /sys/bus/ccw/drivers/ctcm/bind "$SCH_R_DEVBUSID"
+ fi
+ if [ "$curdrv" = "ctcm" -a "$NETTYPE" = "lcs" ]; then
+ sysecho /sys/bus/ccw/drivers/ctcm/unbind "$SCH_R_DEVBUSID"
+ sysecho /sys/bus/ccw/drivers/lcs/bind "$SCH_R_DEVBUSID"
+ fi
+ local channel2
+ channel2=${SUBCHANNELS##*,}
+ curdrv=$(readlink /sys/bus/ccw/devices/$channel2/driver)
+ curdrv=${curdrv##*/}
+ if [ "$curdrv" = "lcs" -a "$NETTYPE" = "ctc" ]; then
+ sysecho /sys/bus/ccw/drivers/lcs/unbind "$channel2"
+ sysecho /sys/bus/ccw/drivers/ctcm/bind "$channel2"
+ fi
+ if [ "$curdrv" = "ctcm" -a "$NETTYPE" = "lcs" ]; then
+ sysecho /sys/bus/ccw/drivers/ctcm/unbind "$channel2"
+ sysecho /sys/bus/ccw/drivers/lcs/bind "$channel2"
+ fi
+ # create ccwgroup
if sysecho /sys/bus/ccwgroup/drivers/${driver}/group "$SUBCHANNELS"; then
udevadm settle
case "$NETTYPE" in



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org