7
7
* Bugreports.to..: <Linux390@de.ibm.com>
8
8
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
9
9
*
10
- * $Revision: 1.110 $
10
+ * $Revision: 1.114 $
11
11
*/
12
12
13
13
#include <linux/config.h>
@@ -1142,8 +1142,8 @@ __dasd_process_blk_queue(struct dasd_device * device)
1142
1142
req = elv_next_request (queue );
1143
1143
if (device -> ro_flag && rq_data_dir (req ) == WRITE ) {
1144
1144
DBF_EVENT (DBF_ERR ,
1145
- "(%04x ) Rejecting write request %p" ,
1146
- _ccw_device_get_device_number ( device -> cdev ) ,
1145
+ "(%s ) Rejecting write request %p" ,
1146
+ device -> cdev -> dev . bus_id ,
1147
1147
req );
1148
1148
blkdev_dequeue_request (req );
1149
1149
dasd_end_request (req , 0 );
@@ -1154,8 +1154,8 @@ __dasd_process_blk_queue(struct dasd_device * device)
1154
1154
if (PTR_ERR (cqr ) == - ENOMEM )
1155
1155
break ; /* terminate request queue loop */
1156
1156
DBF_EVENT (DBF_ERR ,
1157
- "(%04x ) CCW creation failed on request %p" ,
1158
- _ccw_device_get_device_number ( device -> cdev ) ,
1157
+ "(%s ) CCW creation failed on request %p" ,
1158
+ device -> cdev -> dev . bus_id ,
1159
1159
req );
1160
1160
blkdev_dequeue_request (req );
1161
1161
dasd_end_request (req , 0 );
@@ -1728,12 +1728,10 @@ int
1728
1728
dasd_generic_probe (struct ccw_device * cdev ,
1729
1729
struct dasd_discipline * discipline )
1730
1730
{
1731
- int devno ;
1732
1731
int ret = 0 ;
1733
1732
1734
- devno = _ccw_device_get_device_number (cdev );
1735
- if (dasd_autodetect
1736
- && (ret = dasd_add_range (devno , devno , DASD_FEATURE_DEFAULT ))) {
1733
+ if (dasd_autodetect &&
1734
+ (ret = dasd_add_busid (cdev -> dev .bus_id , DASD_FEATURE_DEFAULT ))) {
1737
1735
printk (KERN_WARNING
1738
1736
"dasd_generic_probe: cannot autodetect %s\n" ,
1739
1737
cdev -> dev .bus_id );
@@ -1830,12 +1828,6 @@ dasd_generic_set_offline (struct ccw_device *cdev)
1830
1828
struct dasd_device * device ;
1831
1829
1832
1830
device = cdev -> dev .driver_data ;
1833
- if (atomic_read (& device -> open_count ) > 0 ) {
1834
- printk (KERN_WARNING "Can't offline dasd device with open"
1835
- " count = %i.\n" ,
1836
- atomic_read (& device -> open_count ));
1837
- return - EBUSY ;
1838
- }
1839
1831
dasd_set_target_state (device , DASD_STATE_NEW );
1840
1832
dasd_delete_device (device );
1841
1833
@@ -1854,7 +1846,6 @@ dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver)
1854
1846
struct device_driver * drv ;
1855
1847
struct device * d , * dev ;
1856
1848
struct ccw_device * cdev ;
1857
- int devno ;
1858
1849
1859
1850
drv = get_driver (& dasd_discipline_driver -> driver );
1860
1851
down_read (& drv -> bus -> subsys .rwsem );
@@ -1864,8 +1855,7 @@ dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver)
1864
1855
if (!dev )
1865
1856
continue ;
1866
1857
cdev = to_ccwdev (dev );
1867
- devno = _ccw_device_get_device_number (cdev );
1868
- if (dasd_autodetect || dasd_devno_in_range (devno ) == 0 )
1858
+ if (dasd_autodetect || dasd_busid_known (cdev -> dev .bus_id ) == 0 )
1869
1859
ccw_device_set_online (cdev );
1870
1860
put_device (dev );
1871
1861
}
@@ -1934,31 +1924,6 @@ dasd_use_diag_store(struct device *dev, const char *buf, size_t count)
1934
1924
static
1935
1925
DEVICE_ATTR (use_diag , 0644 , dasd_use_diag_show , dasd_use_diag_store ) ;
1936
1926
1937
- #if 0
1938
- /* this file shows the same information as /proc/dasd/devices using
1939
- * an inaccaptable interface */
1940
- /* TODO: Split this up into smaller files! */
1941
- static ssize_t
1942
- dasd_devices_show (struct device * dev , char * buf )
1943
- {
1944
-
1945
- struct dasd_device * device ;
1946
- dasd_devmap_t * devmap ;
1947
-
1948
- devmap = NULL ;
1949
- device = dev -> driver_data ;
1950
- if (device )
1951
- devmap = dasd_devmap_from_devno (device -> devno );
1952
-
1953
- if (!devmap )
1954
- return sprintf (buf , "unused\n" );
1955
-
1956
- return min ((size_t ) dasd_devices_print (devmap , buf ), PAGE_SIZE );
1957
- }
1958
-
1959
- static DEVICE_ATTR (dasd , 0444 , dasd_devices_show , 0 );
1960
- #endif
1961
-
1962
1927
static ssize_t
1963
1928
dasd_discipline_show (struct device * dev , char * buf )
1964
1929
{
@@ -1973,7 +1938,6 @@ dasd_discipline_show(struct device *dev, char *buf)
1973
1938
static DEVICE_ATTR (discipline , 0444 , dasd_discipline_show , NULL) ;
1974
1939
1975
1940
static struct attribute * dasd_attrs [] = {
1976
- //&dev_attr_dasd.attr,
1977
1941
& dev_attr_readonly .attr ,
1978
1942
& dev_attr_discipline .attr ,
1979
1943
& dev_attr_use_diag .attr ,
0 commit comments