RCS file: /usr1/CVS/rtems/c/src/libchip/i2c/spi-sd-card.c,v
retrieving revision 1.13
diff -u -r1.13 spi-sd-card.c
|
|
|
1122 | 1122 | { |
1123 | 1123 | RTEMS_DEBUG_PRINT( "dev = %u, req = %u, arg = 0x08%x\n", dev, req, arg); |
1124 | 1124 | if (req == RTEMS_BLKIO_REQUEST) { |
1125 | | rtems_device_minor_number minor = rtems_disk_physical_minor_number( dd); |
| 1125 | rtems_device_minor_number minor = rtems_disk_get_minor_number( dd); |
1126 | 1126 | sd_card_driver_entry *e = &sd_card_driver_table [minor]; |
1127 | 1127 | rtems_blkdev_request *r = (rtems_blkdev_request *) arg; |
1128 | 1128 | switch (r->req) { |
RCS file: /usr1/CVS/rtems/c/src/libchip/ide/ata.c,v
retrieving revision 1.33
diff -u -r1.33 ata.c
|
|
|
1009 | 1009 | static int |
1010 | 1010 | ata_ioctl(rtems_disk_device *dd, uint32_t cmd, void *argp) |
1011 | 1011 | { |
1012 | | dev_t device = rtems_disk_physical_device_number(dd); |
| 1012 | dev_t device = rtems_disk_get_device_identifier(dd); |
1013 | 1013 | rtems_status_code status; |
1014 | 1014 | rtems_device_minor_number rel_minor; |
1015 | 1015 | |
RCS file: /usr1/CVS/rtems/cpukit/libblock/include/rtems/diskdevs.h,v
retrieving revision 1.17
diff -u -r1.17 diskdevs.h
|
|
|
143 | 143 | * @{ |
144 | 144 | */ |
145 | 145 | |
146 | | static inline dev_t rtems_disk_physical_device_number( |
| 146 | static inline dev_t rtems_disk_get_device_identifier( |
147 | 147 | const rtems_disk_device *dd |
148 | 148 | ) |
149 | 149 | { |
150 | | return dd->phys_dev->dev; |
151 | | } |
152 | | |
153 | | static inline rtems_device_major_number rtems_disk_physical_major_number( |
154 | | const rtems_disk_device *dd |
155 | | ) |
156 | | { |
157 | | return rtems_filesystem_dev_major_t(dd->phys_dev->dev); |
158 | | } |
159 | | |
160 | | static inline rtems_device_minor_number rtems_disk_physical_minor_number( |
161 | | const rtems_disk_device *dd |
162 | | ) |
163 | | { |
164 | | return rtems_filesystem_dev_minor_t(dd->phys_dev->dev); |
165 | | } |
166 | | |
167 | | static inline dev_t rtems_disk_device_number(const rtems_disk_device *dd) |
168 | | { |
169 | 150 | return dd->dev; |
170 | 151 | } |
171 | 152 | |
172 | | static inline rtems_device_major_number rtems_disk_major_number( |
| 153 | static inline rtems_device_major_number rtems_disk_get_major_number( |
173 | 154 | const rtems_disk_device *dd |
174 | 155 | ) |
175 | 156 | { |
176 | 157 | return rtems_filesystem_dev_major_t(dd->dev); |
177 | 158 | } |
178 | 159 | |
179 | | static inline rtems_device_minor_number rtems_disk_minor_number( |
| 160 | static inline rtems_device_minor_number rtems_disk_get_minor_number( |
180 | 161 | const rtems_disk_device *dd |
181 | 162 | ) |
182 | 163 | { |
183 | 164 | return rtems_filesystem_dev_minor_t(dd->dev); |
184 | 165 | } |
185 | 166 | |
186 | | static inline void *rtems_disk_driver_data(const rtems_disk_device *dd) |
| 167 | static inline void *rtems_disk_get_driver_data( |
| 168 | const rtems_disk_device *dd |
| 169 | ) |
187 | 170 | { |
188 | 171 | return dd->driver_data; |
189 | 172 | } |
190 | 173 | |
191 | | static inline uint32_t rtems_disk_block_size(const rtems_disk_device *dd) |
192 | | { |
193 | | return dd->block_size; |
194 | | } |
195 | | |
196 | | static inline uint32_t rtems_disk_media_block_size(const rtems_disk_device *dd) |
| 174 | static inline uint32_t rtems_disk_get_media_block_size( |
| 175 | const rtems_disk_device *dd |
| 176 | ) |
197 | 177 | { |
198 | 178 | return dd->media_block_size; |
199 | 179 | } |
RCS file: /usr1/CVS/rtems/cpukit/libblock/src/bdbuf.c,v
retrieving revision 1.45
diff -u -r1.45 bdbuf.c
|
|
|
1914 | 1914 | req->status = RTEMS_RESOURCE_IN_USE; |
1915 | 1915 | req->error = 0; |
1916 | 1916 | |
1917 | | result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, req); |
| 1917 | result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req); |
1918 | 1918 | |
1919 | 1919 | if (result == 0) |
1920 | 1920 | { |
… |
… |
|
2324 | 2324 | * Perform the transfer. No cache locks, no preemption, only the disk |
2325 | 2325 | * device is being held. |
2326 | 2326 | */ |
2327 | | result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, transfer->write_req); |
| 2327 | result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, |
| 2328 | transfer->write_req); |
2328 | 2329 | if (result < 0) |
2329 | 2330 | { |
2330 | 2331 | rtems_bdbuf_lock_cache (); |
RCS file: /usr1/CVS/rtems/cpukit/libblock/src/blkdev.c,v
retrieving revision 1.21
diff -u -r1.21 blkdev.c
|
|
|
251 | 251 | break; |
252 | 252 | |
253 | 253 | case RTEMS_BLKIO_REQUEST: |
254 | | { |
255 | | rtems_blkdev_request *req = args->buffer; |
256 | | args->ioctl_return = (uint32_t) dd->ioctl(dd, args->command, req); |
| 254 | /* |
| 255 | * It is not allowed to directly access the driver circumventing |
| 256 | * the cache. |
| 257 | */ |
| 258 | rc = RTEMS_INVALID_NAME; |
| 259 | args->ioctl_return = -1; |
257 | 260 | break; |
258 | | } |
259 | 261 | |
260 | 262 | default: |
261 | | args->ioctl_return = (uint32_t) dd->ioctl(dd, args->command, |
262 | | args->buffer); |
| 263 | args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev, |
| 264 | args->command, |
| 265 | args->buffer); |
263 | 266 | break; |
264 | 267 | } |
265 | 268 | rtems_disk_release(dd); |
RCS file: /usr1/CVS/rtems/cpukit/libblock/src/flashdisk.c,v
retrieving revision 1.13
diff -u -r1.13 flashdisk.c
|
|
|
2343 | 2343 | static int |
2344 | 2344 | rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp) |
2345 | 2345 | { |
2346 | | dev_t dev = rtems_disk_physical_device_number (dd); |
| 2346 | dev_t dev = rtems_disk_get_device_identifier (dd); |
2347 | 2347 | rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev); |
2348 | 2348 | rtems_blkdev_request* r = argp; |
2349 | 2349 | rtems_status_code sc; |
RCS file: /usr1/CVS/rtems/cpukit/libblock/src/nvdisk.c,v
retrieving revision 1.12
diff -u -r1.12 nvdisk.c
|
|
|
682 | 682 | static int |
683 | 683 | rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp) |
684 | 684 | { |
685 | | dev_t dev = rtems_disk_physical_device_number (dd); |
| 685 | dev_t dev = rtems_disk_get_device_identifier (dd); |
686 | 686 | rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev); |
687 | 687 | rtems_blkdev_request* r = argp; |
688 | 688 | rtems_status_code sc; |
RCS file: /usr1/CVS/rtems/cpukit/libblock/src/ramdisk-driver.c,v
retrieving revision 1.3
diff -u -r1.3 ramdisk-driver.c
|
|
|
101 | 101 | case RTEMS_BLKIO_REQUEST: |
102 | 102 | { |
103 | 103 | rtems_blkdev_request *r = argp; |
104 | | struct ramdisk *rd = rtems_disk_driver_data(dd); |
| 104 | struct ramdisk *rd = rtems_disk_get_driver_data(dd); |
105 | 105 | |
106 | 106 | switch (r->req) |
107 | 107 | { |