• Home
  • Raw
  • Download

Lines Matching refs:ddb

40 	int ddb, i;  in asd_get_ddb()  local
42 ddb = FIND_FREE_DDB(asd_ha); in asd_get_ddb()
43 if (ddb >= asd_ha->hw_prof.max_ddbs) { in asd_get_ddb()
44 ddb = -ENOMEM; in asd_get_ddb()
47 SET_DDB(ddb, asd_ha); in asd_get_ddb()
50 asd_ddbsite_write_dword(asd_ha, ddb, i, 0); in asd_get_ddb()
52 return ddb; in asd_get_ddb()
74 static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb) in asd_free_ddb() argument
76 if (!ddb || ddb >= 0xFFFF) in asd_free_ddb()
78 asd_ddbsite_write_byte(asd_ha, ddb, DDB_TYPE, DDB_TYPE_UNUSED); in asd_free_ddb()
79 CLEAR_DDB(ddb, asd_ha); in asd_free_ddb()
85 int ddb = (int) (unsigned long) dev->lldd_dev; in asd_set_ddb_type() local
88 asd_ddbsite_write_byte(asd_ha,ddb, DDB_TYPE, DDB_TYPE_PM_PORT); in asd_set_ddb_type()
90 asd_ddbsite_write_byte(asd_ha,ddb, DDB_TYPE, DDB_TYPE_TARGET); in asd_set_ddb_type()
92 asd_ddbsite_write_byte(asd_ha,ddb,DDB_TYPE,DDB_TYPE_INITIATOR); in asd_set_ddb_type()
98 int ddb, i; in asd_init_sata_tag_ddb() local
100 ddb = asd_get_ddb(asd_ha); in asd_init_sata_tag_ddb()
101 if (ddb < 0) in asd_init_sata_tag_ddb()
102 return ddb; in asd_init_sata_tag_ddb()
105 asd_ddbsite_write_word(asd_ha, ddb, i, 0xFFFF); in asd_init_sata_tag_ddb()
108 SISTER_DDB, ddb); in asd_init_sata_tag_ddb()
116 int ddb = (int) (unsigned long) dev->lldd_dev; in asd_set_dmamode() local
122 asd_ddbsite_write_dword(asd_ha, ddb, SATA_TAG_ALLOC_MASK, in asd_set_dmamode()
124 asd_ddbsite_write_byte(asd_ha, ddb, NUM_SATA_TAGS, qdepth); in asd_set_dmamode()
140 int ddb = (int) (unsigned long) dev->lldd_dev; in asd_init_sata() local
142 asd_ddbsite_write_word(asd_ha, ddb, ATA_CMD_SCBPTR, 0xFFFF); in asd_init_sata()
147 asd_ddbsite_write_byte(asd_ha, ddb, SATA_STATUS, fis->status); in asd_init_sata()
149 asd_ddbsite_write_word(asd_ha, ddb, NCQ_DATA_SCB_PTR, 0xFFFF); in asd_init_sata()
156 int ddb, i; in asd_init_target_ddb() local
160 ddb = asd_get_ddb(asd_ha); in asd_init_target_ddb()
161 if (ddb < 0) in asd_init_target_ddb()
162 return ddb; in asd_init_target_ddb()
164 dev->lldd_dev = (void *) (unsigned long) ddb; in asd_init_target_ddb()
166 asd_ddbsite_write_byte(asd_ha, ddb, 0, DDB_TP_CONN_TYPE); in asd_init_target_ddb()
167 asd_ddbsite_write_byte(asd_ha, ddb, 1, 0); in asd_init_target_ddb()
168 asd_ddbsite_write_word(asd_ha, ddb, INIT_CONN_TAG, 0xFFFF); in asd_init_target_ddb()
170 asd_ddbsite_write_byte(asd_ha, ddb, DEST_SAS_ADDR+i, in asd_init_target_ddb()
172 asd_ddbsite_write_word(asd_ha, ddb, SEND_QUEUE_HEAD, 0xFFFF); in asd_init_target_ddb()
174 asd_ddbsite_write_byte(asd_ha, ddb, CONN_MASK, dev->port->phy_mask); in asd_init_target_ddb()
193 asd_ddbsite_write_byte(asd_ha, ddb, MAX_CCONN, in asd_init_target_ddb()
196 asd_ddbsite_write_byte(asd_ha, ddb, MAX_CCONN, in asd_init_target_ddb()
198 asd_ddbsite_write_byte(asd_ha, ddb, NUM_CTX, 1); in asd_init_target_ddb()
203 asd_ddbsite_write_byte(asd_ha, ddb, DDB_TARG_FLAGS, flags); in asd_init_target_ddb()
208 asd_ddbsite_write_byte(asd_ha, ddb, DDB_TARG_FLAGS2, flags); in asd_init_target_ddb()
210 asd_ddbsite_write_word(asd_ha, ddb, EXEC_QUEUE_TAIL, 0xFFFF); in asd_init_target_ddb()
211 asd_ddbsite_write_word(asd_ha, ddb, SEND_QUEUE_TAIL, 0xFFFF); in asd_init_target_ddb()
212 asd_ddbsite_write_word(asd_ha, ddb, SISTER_DDB, 0xFFFF); in asd_init_target_ddb()
217 asd_free_ddb(asd_ha, ddb); in asd_init_target_ddb()
225 asd_ddbsite_write_word(asd_ha, ddb, ITNL_TIMEOUT, in asd_init_target_ddb()
229 asd_ddbsite_write_word(asd_ha, ddb, ITNL_TIMEOUT, in asd_init_target_ddb()
238 int ddb, i; in asd_init_sata_pm_table_ddb() local
240 ddb = asd_get_ddb(asd_ha); in asd_init_sata_pm_table_ddb()
241 if (ddb < 0) in asd_init_sata_pm_table_ddb()
242 return ddb; in asd_init_sata_pm_table_ddb()
245 asd_ddbsite_write_word(asd_ha, ddb, i, 0xFFFF); in asd_init_sata_pm_table_ddb()
248 SISTER_DDB, ddb); in asd_init_sata_pm_table_ddb()
266 int ddb, i, parent_ddb, pmtable_ddb; in asd_init_sata_pm_port_ddb() local
270 ddb = asd_get_ddb(asd_ha); in asd_init_sata_pm_port_ddb()
271 if (ddb < 0) in asd_init_sata_pm_port_ddb()
272 return ddb; in asd_init_sata_pm_port_ddb()
276 asd_ddbsite_write_byte(asd_ha, ddb, PM_PORT_FLAGS, flags); in asd_init_sata_pm_port_ddb()
277 asd_ddbsite_write_word(asd_ha, ddb, SISTER_DDB, 0xFFFF); in asd_init_sata_pm_port_ddb()
278 asd_ddbsite_write_word(asd_ha, ddb, ATA_CMD_SCBPTR, 0xFFFF); in asd_init_sata_pm_port_ddb()
282 asd_ddbsite_write_word(asd_ha, ddb, PARENT_DDB, parent_ddb); in asd_init_sata_pm_port_ddb()
284 asd_ddbsite_write_word(asd_ha, pmtable_ddb, dev->sata_dev.port_no,ddb); in asd_init_sata_pm_port_ddb()
286 if (asd_ddbsite_read_byte(asd_ha, ddb, NUM_SATA_TAGS) > 0) { in asd_init_sata_pm_port_ddb()
289 asd_free_ddb(asd_ha, ddb); in asd_init_sata_pm_port_ddb()
350 int ddb, sister_ddb; in asd_dev_gone() local
355 ddb = (int) (unsigned long) dev->lldd_dev; in asd_dev_gone()
356 sister_ddb = asd_ddbsite_read_word(asd_ha, ddb, SISTER_DDB); in asd_dev_gone()
360 asd_free_ddb(asd_ha, ddb); in asd_dev_gone()