css.c (f67f129e519fa87f8ebd236b6336fe43f31ee141) | css.c (f5daba1d4116d964435ddd99f32b6c80448a496b) |
---|---|
1/* 2 * drivers/s390/cio/css.c 3 * driver for channel subsystem 4 * 5 * Copyright IBM Corp. 2002,2008 6 * Author(s): Arnd Bergmann (arndb@de.ibm.com) 7 * Cornelia Huck (cornelia.huck@de.ibm.com) 8 */ --- 4 unchanged lines hidden (view full) --- 13#include <linux/module.h> 14#include <linux/init.h> 15#include <linux/device.h> 16#include <linux/slab.h> 17#include <linux/errno.h> 18#include <linux/list.h> 19#include <linux/reboot.h> 20#include <asm/isc.h> | 1/* 2 * drivers/s390/cio/css.c 3 * driver for channel subsystem 4 * 5 * Copyright IBM Corp. 2002,2008 6 * Author(s): Arnd Bergmann (arndb@de.ibm.com) 7 * Cornelia Huck (cornelia.huck@de.ibm.com) 8 */ --- 4 unchanged lines hidden (view full) --- 13#include <linux/module.h> 14#include <linux/init.h> 15#include <linux/device.h> 16#include <linux/slab.h> 17#include <linux/errno.h> 18#include <linux/list.h> 19#include <linux/reboot.h> 20#include <asm/isc.h> |
21#include <asm/crw.h> |
|
21 | 22 |
22#include "../s390mach.h" | |
23#include "css.h" 24#include "cio.h" 25#include "cio_debug.h" 26#include "ioasm.h" 27#include "chsc.h" 28#include "device.h" 29#include "idset.h" 30#include "chp.h" --- 236 unchanged lines hidden (view full) --- 267 * We don't want to generate uevents for I/O subchannels that don't 268 * have a working ccw device behind them since they will be 269 * unregistered before they can be used anyway, so we delay the add 270 * uevent until after device recognition was successful. 271 * Note that we suppress the uevent for all subchannel types; 272 * the subchannel driver can decide itself when it wants to inform 273 * userspace of its existence. 274 */ | 23#include "css.h" 24#include "cio.h" 25#include "cio_debug.h" 26#include "ioasm.h" 27#include "chsc.h" 28#include "device.h" 29#include "idset.h" 30#include "chp.h" --- 236 unchanged lines hidden (view full) --- 267 * We don't want to generate uevents for I/O subchannels that don't 268 * have a working ccw device behind them since they will be 269 * unregistered before they can be used anyway, so we delay the add 270 * uevent until after device recognition was successful. 271 * Note that we suppress the uevent for all subchannel types; 272 * the subchannel driver can decide itself when it wants to inform 273 * userspace of its existence. 274 */ |
275 dev_set_uevent_suppress(&sch->dev, 1); | 275 sch->dev.uevent_suppress = 1; |
276 css_update_ssd_info(sch); 277 /* make it known to the system */ 278 ret = css_sch_device_register(sch); 279 if (ret) { 280 CIO_MSG_EVENT(0, "Could not register sch 0.%x.%04x: %d\n", 281 sch->schid.ssid, sch->schid.sch_no, ret); 282 return ret; 283 } 284 if (!sch->driver) { 285 /* 286 * No driver matched. Generate the uevent now so that 287 * a fitting driver module may be loaded based on the 288 * modalias. 289 */ | 276 css_update_ssd_info(sch); 277 /* make it known to the system */ 278 ret = css_sch_device_register(sch); 279 if (ret) { 280 CIO_MSG_EVENT(0, "Could not register sch 0.%x.%04x: %d\n", 281 sch->schid.ssid, sch->schid.sch_no, ret); 282 return ret; 283 } 284 if (!sch->driver) { 285 /* 286 * No driver matched. Generate the uevent now so that 287 * a fitting driver module may be loaded based on the 288 * modalias. 289 */ |
290 dev_set_uevent_suppress(&sch->dev, 0); | 290 sch->dev.uevent_suppress = 0; |
291 kobject_uevent(&sch->dev.kobj, KOBJ_ADD); 292 } 293 return ret; 294} 295 296int css_probe_device(struct subchannel_id schid) 297{ 298 int ret; --- 461 unchanged lines hidden (view full) --- 760 ret = chsc_alloc_sei_area(); 761 if (ret) 762 goto out; 763 764 ret = slow_subchannel_init(); 765 if (ret) 766 goto out; 767 | 291 kobject_uevent(&sch->dev.kobj, KOBJ_ADD); 292 } 293 return ret; 294} 295 296int css_probe_device(struct subchannel_id schid) 297{ 298 int ret; --- 461 unchanged lines hidden (view full) --- 760 ret = chsc_alloc_sei_area(); 761 if (ret) 762 goto out; 763 764 ret = slow_subchannel_init(); 765 if (ret) 766 goto out; 767 |
768 ret = s390_register_crw_handler(CRW_RSC_SCH, css_process_crw); | 768 ret = crw_register_handler(CRW_RSC_SCH, css_process_crw); |
769 if (ret) 770 goto out; 771 772 if ((ret = bus_register(&css_bus_type))) 773 goto out; 774 775 /* Try to enable MSS. */ 776 ret = chsc_enable_facility(CHSC_SDA_OC_MSS); --- 63 unchanged lines hidden (view full) --- 840 if (css_chsc_characteristics.secm) 841 device_remove_file(&css->device, 842 &dev_attr_cm_enable); 843 device_unregister(&css->device); 844 } 845out_bus: 846 bus_unregister(&css_bus_type); 847out: | 769 if (ret) 770 goto out; 771 772 if ((ret = bus_register(&css_bus_type))) 773 goto out; 774 775 /* Try to enable MSS. */ 776 ret = chsc_enable_facility(CHSC_SDA_OC_MSS); --- 63 unchanged lines hidden (view full) --- 840 if (css_chsc_characteristics.secm) 841 device_remove_file(&css->device, 842 &dev_attr_cm_enable); 843 device_unregister(&css->device); 844 } 845out_bus: 846 bus_unregister(&css_bus_type); 847out: |
848 s390_unregister_crw_handler(CRW_RSC_CSS); | 848 crw_unregister_handler(CRW_RSC_CSS); |
849 chsc_free_sei_area(); 850 kfree(slow_subchannel_set); 851 pr_alert("The CSS device driver initialization failed with " 852 "errno=%d\n", ret); 853 return ret; 854} 855 856int sch_is_pseudo_sch(struct subchannel *sch) --- 104 unchanged lines hidden --- | 849 chsc_free_sei_area(); 850 kfree(slow_subchannel_set); 851 pr_alert("The CSS device driver initialization failed with " 852 "errno=%d\n", ret); 853 return ret; 854} 855 856int sch_is_pseudo_sch(struct subchannel *sch) --- 104 unchanged lines hidden --- |