Lines Matching refs:sbd
39 static int ps3stor_open_hv_device(struct ps3_system_bus_device *sbd) in ps3stor_open_hv_device() argument
41 int error = ps3_open_hv_device(sbd); in ps3stor_open_hv_device()
46 if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) in ps3stor_open_hv_device()
49 if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) in ps3stor_open_hv_device()
55 static int ps3stor_close_hv_device(struct ps3_system_bus_device *sbd) in ps3stor_close_hv_device() argument
59 if (sbd->match_id == PS3_MATCH_ID_STOR_DISK in ps3stor_close_hv_device()
62 ps3_flash_workaround.disk_sbd = sbd; in ps3stor_close_hv_device()
66 error = ps3_close_hv_device(sbd); in ps3stor_close_hv_device()
71 if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) in ps3stor_close_hv_device()
74 if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) { in ps3stor_close_hv_device()
93 if (dev->sbd.match_id == PS3_MATCH_ID_STOR_ROM) { in ps3stor_probe_access()
101 dev_dbg(&dev->sbd.core, in ps3stor_probe_access()
109 dev_dbg(&dev->sbd.core, "%s:%u: read failed, " in ps3stor_probe_access()
115 dev_dbg(&dev->sbd.core, "%s:%u: region %u is accessible\n", in ps3stor_probe_access()
127 dev_info(&dev->sbd.core, in ps3stor_probe_access()
132 dev_info(&dev->sbd.core, in ps3stor_probe_access()
153 error = ps3stor_open_hv_device(&dev->sbd); in ps3stor_setup()
155 dev_err(&dev->sbd.core, in ps3stor_setup()
161 error = ps3_sb_event_receive_port_setup(&dev->sbd, PS3_BINDING_CPU_ANY, in ps3stor_setup()
164 dev_err(&dev->sbd.core, in ps3stor_setup()
171 dev->sbd.core.driver->name, dev); in ps3stor_setup()
173 dev_err(&dev->sbd.core, "%s:%u: request_irq failed %d\n", in ps3stor_setup()
181 dev_err(&dev->sbd.core, in ps3stor_setup()
190 dev->sbd.d_region = &dev->dma_region; in ps3stor_setup()
191 ps3_dma_region_init(&dev->sbd, &dev->dma_region, page_size, in ps3stor_setup()
195 dev_err(&dev->sbd.core, "%s:%u: cannot create DMA region\n", in ps3stor_setup()
202 dev->bounce_dma = dma_map_single(&dev->sbd.core, dev->bounce_buf, in ps3stor_setup()
205 dev_err(&dev->sbd.core, "%s:%u: map DMA region failed\n", in ps3stor_setup()
213 dev_err(&dev->sbd.core, "%s:%u: No accessible regions found\n", in ps3stor_setup()
220 dma_unmap_single(&dev->sbd.core, dev->bounce_dma, dev->bounce_size, in ps3stor_setup()
227 ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); in ps3stor_setup()
229 ps3stor_close_hv_device(&dev->sbd); in ps3stor_setup()
244 dma_unmap_single(&dev->sbd.core, dev->bounce_dma, dev->bounce_size, in ps3stor_teardown()
250 error = ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); in ps3stor_teardown()
252 dev_err(&dev->sbd.core, in ps3stor_teardown()
256 error = ps3stor_close_hv_device(&dev->sbd); in ps3stor_teardown()
258 dev_err(&dev->sbd.core, in ps3stor_teardown()
283 dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n", in ps3stor_read_write_sectors()
287 res = write ? lv1_storage_write(dev->sbd.dev_id, region_id, in ps3stor_read_write_sectors()
290 : lv1_storage_read(dev->sbd.dev_id, region_id, in ps3stor_read_write_sectors()
294 dev_dbg(&dev->sbd.core, "%s:%u: %s failed %d\n", __func__, in ps3stor_read_write_sectors()
301 dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__, in ps3stor_read_write_sectors()
306 dev_dbg(&dev->sbd.core, "%s:%u: %s completed\n", __func__, __LINE__, in ps3stor_read_write_sectors()
331 dev_dbg(&dev->sbd.core, "%s:%u: send device command 0x%llx\n", __func__, in ps3stor_send_command()
336 res = lv1_storage_send_device_command(dev->sbd.dev_id, cmd, arg1, in ps3stor_send_command()
339 dev_err(&dev->sbd.core, in ps3stor_send_command()
347 dev_dbg(&dev->sbd.core, "%s:%u: command 0x%llx failed 0x%llx\n", in ps3stor_send_command()
352 dev_dbg(&dev->sbd.core, "%s:%u: command 0x%llx completed\n", __func__, in ps3stor_send_command()